Created
August 21, 2013 16:11
-
-
Save dolzenko/6296543 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
module I18n | |
class JustRaiseExceptionHandler < ExceptionHandler | |
def call(exception, locale, key, options) | |
if exception.is_a?(MissingTranslation) | |
raise exception.to_exception | |
else | |
super | |
end | |
end | |
end | |
end | |
I18n.exception_handler = I18n::JustRaiseExceptionHandler.new |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment