Skip to content

Instantly share code, notes, and snippets.

@Fivell
Created January 14, 2014 14:31
Show Gist options
  • Select an option

  • Save Fivell/8419154 to your computer and use it in GitHub Desktop.

Select an option

Save Fivell/8419154 to your computer and use it in GitHub Desktop.
exeption notification
rescue_from StandardError, :with => :notify_exception
def notify_exception(e)
ActionMailer::Base.mail(:from => "[email protected]", :to => "[email protected]",
:subject => e.message,
:body => [e.backtrace.join("\n"), self.request.inspect].join("\n\n\n")).deliver
raise e
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment