Browse files

simplify to only one condition

Signed-off-by: Andrew White <andyw@pixeltrix.co.uk>
  • Loading branch information...
1 parent 0ac0d7a commit 0438e92ae73544874ab9cd73d0a33e7a815c395b @dmathieu dmathieu committed with pixeltrix Jun 15, 2011
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 0438e92

Please sign in to comment.