mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
simplify to only one condition
Signed-off-by: Andrew White <andyw@pixeltrix.co.uk>
This commit is contained in:
parent
0ac0d7a0f0
commit
0438e92ae7
1 changed files with 1 additions and 5 deletions
|
@ -5,11 +5,7 @@ module I18n
|
|||
class ExceptionHandler
|
||||
include Module.new {
|
||||
def call(exception, locale, key, options)
|
||||
if exception.is_a?(MissingTranslation)
|
||||
options[:rescue_format] == :html ? super.html_safe : super
|
||||
else
|
||||
super
|
||||
end
|
||||
exception.is_a?(MissingTranslation) && options[:rescue_format] == :html ? super.html_safe : super
|
||||
end
|
||||
}
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue