aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/translation_helper.rb
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-12-04 20:07:54 -0200
committerSantiago Pastorino <santiago@wyeworks.com>2010-12-04 20:08:23 -0200
commitb696dd70db651c6cb4a096dd0d5762416acd9917 (patch)
tree7b0eb91b9169c29fdc1a670373de08de704b29d9 /actionpack/lib/action_view/helpers/translation_helper.rb
parentbe4551f63bc3dec7e182371d25e7b9ee0e9148c4 (diff)
downloadrails-b696dd70db651c6cb4a096dd0d5762416acd9917.tar.gz
rails-b696dd70db651c6cb4a096dd0d5762416acd9917.tar.bz2
rails-b696dd70db651c6cb4a096dd0d5762416acd9917.zip
Allow back passing :rescue_format => nil and test added
Diffstat (limited to 'actionpack/lib/action_view/helpers/translation_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/translation_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/translation_helper.rb b/actionpack/lib/action_view/helpers/translation_helper.rb
index 76dac20f4b..e7ec1df2c8 100644
--- a/actionpack/lib/action_view/helpers/translation_helper.rb
+++ b/actionpack/lib/action_view/helpers/translation_helper.rb
@@ -44,7 +44,7 @@ module ActionView
# naming convention helps to identify translations that include HTML tags so that
# you know what kind of output to expect when you call translate in a template.
def translate(key, options = {})
- options[:rescue_format] ||= :html
+ options.merge!(:rescue_format => :html) unless options.key?(:rescue_format)
translation = I18n.translate(scope_key_by_partial(key), options)
if html_safe_translation_key?(key) && translation.respond_to?(:html_safe)
translation.html_safe