diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-03-16 17:36:09 -0300 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-03-16 13:49:13 -0700 |
commit | 12bf636461e3aab661119ceb3a104cfb70a11666 (patch) | |
tree | ab9405fc800c4c22c15055286fd304969da5231e /actionpack/lib | |
parent | 9659d18c9b76f6383854af0cd3a75abb6b1784ea (diff) | |
download | rails-12bf636461e3aab661119ceb3a104cfb70a11666.tar.gz rails-12bf636461e3aab661119ceb3a104cfb70a11666.tar.bz2 rails-12bf636461e3aab661119ceb3a104cfb70a11666.zip |
translation method of TranslationHelper module returns always SafeBuffer [#4194 status:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/translation_helper.rb | 2 |
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 f996762d6f..26ba4e2ca4 100644 --- a/actionpack/lib/action_view/helpers/translation_helper.rb +++ b/actionpack/lib/action_view/helpers/translation_helper.rb @@ -13,7 +13,7 @@ module ActionView def translate(key, options = {}) options[:raise] = true translation = I18n.translate(scope_key_by_partial(key), options) - translation.respond_to?(:html_safe) ? translation.html_safe : translation + (translation.respond_to?(:join) ? translation.join : translation).html_safe rescue I18n::MissingTranslationData => e keys = I18n.normalize_keys(e.locale, e.key, e.options[:scope]) content_tag('span', keys.join(', '), :class => 'translation_missing') |