PP Junty wrote:
> eric, i didn't find a better solution either. i'd not choose the 
> javascript solution for two reasons. because it depends on the client's 
> configuration/behavior and, most importantly, because sometimes the user 
> wants to see an explicit message from the server that the action was 
> indeed canceled (if her credit card number was in the page, for 
> example).

I use a filter -
   before_filter :check_for_cancel, :only => [:create, :update]

and a method

   def check_for_cancel
     if params[:commit] == 'Cancel'
       redirect_back_or_default.......
     end
   end


--~--~---------~--~----~------------~-------~--~----~
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