I am working on a legacy app and am trying to upgrade it to Rails 3. Currently when I do a search I get the URL: http://localhost:3000/search/external_search/?keyword=argentina. However, when I try to filter out the results, I get http://localhost:3000/search/external_search/?order=Name:ASC, without the keyword parameter in the URL. Since there wasn't a keyword params, the filter wouldn't work. This was messing up my filter, so I decided to add a hidden field tag
<%= hidden_field_tag 'keyword', @search.text %>
which makes it work, but the URL didn't change. I want it to look like:
http://localhost:3000/search/external_search/?keyword=argentina&order=Name:ASC
Where exactly would I accomplish this? In the controller or the form?
paramshash in ROR doesn't care where the variables come from. What's in your controller code?