@ Bituin Bautista

Thank you works great.

On Aug 11, 7:22 pm, "Bituin Bautista" <[email protected]>
wrote:
> try this:
> instead of ActiveRecord::Errors use ActiveRecord::ActiveRecordError,
>
> class ApplicationController < ActionController::Base
>
>   rescue_from ActiveRecord::ActiveRecordError, :with => :method_name
>
> private
>
>   def method_name
>     redirect_to your_path
>   end
>
> end
>
> ----- Original Message -----
> From: "slindsey3000" <[email protected]>
> To: "Ruby on Rails: Talk" <[email protected]>
> Sent: Thursday, August 12, 2010 10:34 AM
> Subject: [Rails] ActiveRecord errors ... Best way to rescue a live web
> application?
>
> > Hi all,
>
> > I have some issues when a link is clicked twice quickly that deletes
> > an ActiveRecord row.
>
> > All I really want to do is set up some universal catch that will
> > redirect all application errors to index.
>
> > Best way?
>
> > Thanks!
>
> > Shawn
>
> > --
> > 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.

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