1
0
Fork 0
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:
Damien Mathieu 2011-06-15 09:56:47 +02:00 committed by Andrew White
parent 0ac0d7a0f0
commit 0438e92ae7

View file

@ -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