I'd like my create and edit forms to both have a Cancel button that redirects back to the referring page. To date, the best approach I've found is to include an additional submit_tag with a :name parameter of cancel. Then inside the controller I have in if/else statement that checks for the existence of params[:cancel]. If it exists, I issue a redirect to the referring page. Otherwise, I proceed with the create/ update.
Is there a better way? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---