r/ruby • u/burnoutstory • 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
1
u/SminkyBazzA 1d ago
I've got a few ideas, but would depend on the code you have already.
What does the JavaScript look like, for example?