Skip to content
Browse files

simplify to only one condition

Signed-off-by: Andrew White <andyw@pixeltrix.co.uk>
  • Loading branch information...
1 parent 8624996 commit 9267a431b8c5fa3d94a1db92e11ff8299624f981 @dmathieu dmathieu committed with pixeltrix
Showing with 1 addition and 5 deletions.
  1. +1 −5 actionpack/lib/action_view/helpers/translation_helper.rb
View
6 actionpack/lib/action_view/helpers/translation_helper.rb
@@ -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

0 comments on commit 9267a43

Please sign in to comment.
Something went wrong with that request. Please try again.