url_for with added params

Updated . Posted . Visible to the public.

You cannot say this because url_for only takes one parameter:

url_for(@deal, :tab => 'general') # won't work

Just use polymorphic_url instead:

polymorphic_url(@deal, :tab => 'general')
Henning Koch
Last edit
Keywords
shorthand, short, link, route, syntax, path, url
License
Source code in this card is licensed under the MIT License.
Posted by Henning Koch to makandra dev (2011-07-19 17:09)