From 0438e92ae73544874ab9cd73d0a33e7a815c395b Mon Sep 17 00:00:00 2001 From: Damien Mathieu <42@dmathieu.com> Date: Wed, 15 Jun 2011 09:56:47 +0200 Subject: simplify to only one condition Signed-off-by: Andrew White --- actionpack/lib/action_view/helpers/translation_helper.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/actionpack/lib/action_view/helpers/translation_helper.rb b/actionpack/lib/action_view/helpers/translation_helper.rb index e5bd55e935..26b6e8b599 100644 --- a/actionpack/lib/action_view/helpers/translation_helper.rb +++ b/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 -- cgit v1.2.3