If you want to add additional parameters to a link using a path helper, for example for nested restful resources, it is useful to use a hash. All additional parameters are added to the query string:

 group_post_path(:group_id => group, :id => post)
 >> /groups/4/posts/2
 group_post_path(:group_id => group, :id => post, :option => 1)
 >> /groups/4/posts/2?option=1

If you use an array or list instead, then you must specify the exact number of arguments and can not pass additional parameters:

 group_post_path(group,post)
Advertisements