I have a resource defined in routes.rb as follows:
map.resources :users
I like to use the cleanest link_to parameter, which would be the following:
link_to @user
I would like to add an additional parameter to this call: "view = local"
If I used user_path, I would do this:
link_to user_path(@user, { :view => 'local' })
Is there a way to get the same result without including the user_path function explicitly? Ideally, I would do something like:
link_to @user, { :view => 'local' }
but it does not work.
source
share