Why not just do javascript:history.back()?

-
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en)



On Sat, Feb 21, 2009 at 5:42 PM, ericindc <[email protected]> wrote:
>
> 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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to