How do we pass parameters in redirect_to in rails?
I know we can pass id using this:

redirect_to :action => action_name,:id => 3

If I want to pass additional parameters like some form data how to achieve it?

EDIT:

For Ruby 2 syntax you have to update the snippet above to:

redirect_to action: action_name, id: 3

10 Answers
10

Leave a Reply

Your email address will not be published. Required fields are marked *