Is there is a way to get the query string in a passed URL string in Rails?
I want to pass a URL string:
http://www.foo.com?id=4&empid=6
>
Rack::Utils.parse_nested_query("a=2") #=> {"a" => "2"}
quoted from: Parse a string as if it were a querystring in Ruby on Rails
Parse query strings the way rails controllers do. Nested queries, typically via a form field name like this lil guy: name="awesome[beer][chips]" # => "?awesome%5Bbeer%5D%5Bchips%5D=cool"
, get 'sliced-and-diced' into an awesome hash: {"awesome"=>{"beer"=>{"chips"=>nil}}}
http://rubydoc.info/github/rack/rack/master/Rack/Utils.parse_nested_query https://github.com/rack/rack/blob/master/lib/rack/utils.rb#L90