You can use the default Ruby CGI module to parse the query string in the Rails controller as follows:
params = CGI.parse(request.query_string)
This will give you what you want, but note that you will not get any other Rails extensions for parsing strings, for example using HashWithIndifferentAccess , so you will need strings, not Symbol characters.
In addition, I do not believe that you can set such parameters with a single line and overwrite the contents of the default rails params parameters. Depending on how broadly you want this change, you may need to patch the monkey or hack some internal details. However, the operational thing, if you want a global change, is to put this in the before filter in application.rb and use a new instance of var, such as @raw_params
gtd
source share