Skip to content

Instantly share code, notes, and snippets.

@dolzenko
Created August 21, 2013 16:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dolzenko/6296543 to your computer and use it in GitHub Desktop.
Save dolzenko/6296543 to your computer and use it in GitHub Desktop.
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