From 0ac0d7a0f03da3d08440c74477d653622d61a26e Mon Sep 17 00:00:00 2001 From: Andrew White Date: Wed, 15 Jun 2011 01:20:50 +0100 Subject: Make MissingTranslation exception handler respect :rescue_format --- actionpack/lib/action_view/helpers/translation_helper.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/helpers/translation_helper.rb b/actionpack/lib/action_view/helpers/translation_helper.rb index fd8fe417d0..e5bd55e935 100644 --- a/actionpack/lib/action_view/helpers/translation_helper.rb +++ b/actionpack/lib/action_view/helpers/translation_helper.rb @@ -5,7 +5,11 @@ module I18n class ExceptionHandler include Module.new { def call(exception, locale, key, options) - exception.is_a?(MissingTranslation) ? super.html_safe : super + if exception.is_a?(MissingTranslation) + options[:rescue_format] == :html ? super.html_safe : super + else + super + end end } end -- cgit v1.2.3