Displaying 1 result from an estimated 1 matches for "choose_action_path".
2013 Mar 06
1
How to create multiple submit paths for form_for?
...to the update action. This is fine.
However, I want to have a second submit button "Save As" that allows a user
to save another version of the material. This second button should then go
to the ''create'' action.
I tried changing the form_for and added the :url => choose_action_path.
Then in the controller the choose_action_path would then use the parameters
sent through the button to decide whether to redirect_to ''create'' or
''update'', but it is not working.
This must be a common need surely. Is there a good solution?
--
You received...