Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/gettext_i18n_rails/string_interpolate_fix.rb
Instance Method Summary collapse
Instance Method Details
#%(*args) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/gettext_i18n_rails/string_interpolate_fix.rb', line 11 def %(*args) if args.first.is_a?(Hash) and html_safe? safe_replacement = Hash[args.first.map{|k,v| [k,ERB::Util.h(v)] }] interpolate_without_html_safe(safe_replacement).html_safe else interpolate_without_html_safe(*args).dup # make sure its not html_safe end end |
#interpolate_without_html_safe ⇒ Object
9 |
# File 'lib/gettext_i18n_rails/string_interpolate_fix.rb', line 9 alias :interpolate_without_html_safe :% |