aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-12-04 19:01:00 -0200
committerSantiago Pastorino <santiago@wyeworks.com>2010-12-04 19:01:00 -0200
commitbe4551f63bc3dec7e182371d25e7b9ee0e9148c4 (patch)
treeb5770f75cc8162e73cab6cb5154fc478a651f3fe /actionpack
parenta11ddf3ee2d2db0378c241a1fd0648b74ff48e20 (diff)
downloadrails-be4551f63bc3dec7e182371d25e7b9ee0e9148c4.tar.gz
rails-be4551f63bc3dec7e182371d25e7b9ee0e9148c4.tar.bz2
rails-be4551f63bc3dec7e182371d25e7b9ee0e9148c4.zip
Use ||= here
Diffstat (limited to 'actionpack')
-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 e7ec1df2c8..76dac20f4b 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.merge!(:rescue_format => :html) unless options.key?(:rescue_format)
+ options[:rescue_format] ||= :html
translation = I18n.translate(scope_key_by_partial(key), options)
if html_safe_translation_key?(key) && translation.respond_to?(:html_safe)
translation.html_safe