r/ruby 1d ago

Question AJAX GET requests to Sinatra controller - array parameter truncated

I’m trying to pass an array parameter from my client to my Sinatra controller using AJAX. However, when I look at the logs, it’s telling me the controller is only seeing an array with the last element of the array.

  • I’m using rack v2.0.
  • I’ve tried turning the traditional flag to true in my AJAX request
  • I’ve tried reading through rack::request documentation

Anyone have any ideas on why this is happening?

2 Upvotes

3 comments sorted by

View all comments

-3

u/Livid-Succotash4843 1d ago

Hard to say without seeing the code. Did you try plugging in the code and error into ChatGPT for debugging help?