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
>
In a Ruby on Rails controller method the URL parameters are available in a hash called params, where the keys are the parameter names, but as Ruby "symbols" (ie. prefixed by a colon). So in your example, params[:id] would equal 4 and params[:empid] would equal 6.
I would recommend reading a good Rails tutorial which should cover basics like this. Here's one example - google will turn up plenty more: