Use ||= here

This commit is contained in:
Santiago Pastorino 2010-12-04 19:01:00 -02:00
parent a11ddf3ee2
commit be4551f63b

@ -44,7 +44,7 @@ module TranslationHelper
# 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