mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Better class name
This commit is contained in:
parent
74fa0d3db0
commit
5890ced113
1 changed files with 2 additions and 2 deletions
|
@ -870,7 +870,7 @@ In other contexts you might want to change this behaviour, though. E.g. the defa
|
|||
|
||||
<ruby>
|
||||
module I18n
|
||||
class JustRaiseHandler < ExceptionHandler
|
||||
class JustRaiseExceptionHandler < ExceptionHandler
|
||||
def call(exception, locale, key, options)
|
||||
if exception.is_a?(MissingTranslation)
|
||||
raise exception.to_exception
|
||||
|
@ -881,7 +881,7 @@ module I18n
|
|||
end
|
||||
end
|
||||
|
||||
I18n.exception_handler = I18n::JustRaiseHandler.new
|
||||
I18n.exception_handler = I18n::JustRaiseExceptionHandler.new
|
||||
</ruby>
|
||||
|
||||
This would re-raise only the +MissingTranslationData+ exception, passing all other input to the default exception handler.
|
||||
|
|
Loading…
Reference in a new issue