passing array parameters to path
ruby-on-rails, ruby-on-rails-3
Solution
Rails uses `parameter[]=value` to signify that `parameter` should be considered an array.
You just need to pass an array to the path helper to get rails to generate the path for you.
`submissions_path(:search_submission_type => "ISH", :submission_status_arr => [51] )`
Problem
I need to pass parameters to a path so that the path looks like the following: ``` http://localhost/submission_app/submissions?search_submission_type=ISH&submission_status_arr[]=51 ``` I tried ``` submissions_path(:search_submission_type => "ISH", :submission_status_arr[] => 51 ) ``` But am getting `wrong number of arguments (0 for 1..2)` error message on my view page. I then tried: ``` submissions_path("search_submission_type=ISH&submission_status_arr[]=51") ``` But this one gives me the following url (Note the dot instead of & before the argument) ``` http://localhost/submission_app/submissions.search_submission_type=ISH&submission_status_arr[]=51 ``` How do I need to pass the parameters so that I get the correct format for the url? Your suggestions are most appreciated. Thank you