views:

24

answers:

1

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
A: 

Yes, just pass your query string parameters in to contact_path:

redirect_to contact_path(@contact, :show_family => 'yes')
Alex Reisner
Thanks! Works great. Silly me didn't even think about including that parameter inside the parenthesis.
Steve