I have a form and I need this form after sending redirect either to one, or to the other action. How to do that?
My first idea:
<%= submit_tag 'Send and redirect to the first action' %>
<%= submit_tag 'Send and redirect to the second action' %>
after sending I would check in the controller the value of the submit button and on the basis the value I would make a redirect to the needed action... but this solution is terrible...
Exist any better way to do it?