Created
May 14, 2012 17:27
-
-
Save rafarubert/2695196 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def rescue_action_in_public(exception) | |
if exception | |
deliverer = self.class.exception_data | |
data = case deliverer | |
when nil then {} | |
when Symbol then send(deliverer) | |
when Proc then deliverer.call(self) | |
end | |
ExceptionNotifier.deliver_exception_notification(exception, self,request, data) | |
flash[:error] = "Blah";redirect_to '/' | |
else | |
super | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment