Class: I18n::ExceptionHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/i18n/exceptions.rb

Instance Method Summary collapse

Instance Method Details

#call(exception, _locale, _key, _options) ⇒ Object


7
8
9
10
11
12
13
# File 'lib/i18n/exceptions.rb', line 7

def call(exception, _locale, _key, _options)
  if exception.is_a?(MissingTranslation)
    exception.message
  else
    raise exception
  end
end