Query String in rails

Most of the times we look up to pass extra params in url. This post will give an overview of possible query string formation but in rails way. For this, we know the common syntax for query string is "/controller/action?name='A'&id=1", where multiple params are separated by '&' literal. Here are the common rails ways: to_param => Returns a String, which Action Pack uses for constructing an URL to this object. i) When operated over hash, it will assignment string. For say, => {a: 1}.to_param => "a=1" ii) When