Reputation: 592
Is it possible to pass url parameters with this type of redirect_to?
redirect_to contact_path(@contact), :show_family => 'yes'
I want a URL that results in:
/contacts/1?show_family=yes
Upvotes: 9
Views: 4540
Reputation: 29442
Yes, just pass your query string parameters in to contact_path
:
redirect_to contact_path(@contact, :show_family => 'yes')
Upvotes: 14