Returns a string representation of the receiver suitable for use as a URL query string: { :name => ' David ', :nationality => ' Danish '}. to_param # => "name=David&nationality=Danish" An optional namespace can be passed to enclose the param names: { :name => ' David ', :nationality => ' Danish '}. to_param (' user ') # => "user[name]=David&user[nationality]=Danish" The string pairs “key=value” that conform the query string are sorted lexicographically in ascending order. This method is also aliased as to_query .
Full article: http://apidock.com/rails/v3.2.1/Hash/to_param
@doctorzaius
»
01 May '12, 2pm
@railsdailytip
»
01 May '12, 1pm