Class: String

### Home Classes Methods

### In Files

- lib/gettext_i18n_rails/string_interpolate_fix.rb

### Parent

Object

### Methods

- #%
- #interpolate_without_html_safe

### Class/Module Index

Quicksearch

- GettextI18nRails
- GettextI18nRails::Backend
- GettextI18nRails::BaseParser
- GettextI18nRails::GettextHooks
- GettextI18nRails::HamlParser
- GettextI18nRails::HtmlSafeTranslations
- GettextI18nRails::ModelAttributesFinder
- GettextI18nRails::Railtie
- GettextI18nRails::SlimParser
- RubyGettextExtractor
- RubyGettextExtractor::Extractor18
- RubyGettextExtractor::Extractor19
- RubyGettextExtractor::ExtractorMethods
- ActionController
- ActionController::Base
- ActiveModel
- ActiveModel::Translation
- ActiveRecord
- ActiveRecord::Base
- I18n
- I18n::Config
- Object
- String

No matching classes.

# String

### Public Instance Methods

%(*args) click to toggle source

    # 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

Also aliased as: interpolate_without_html_safe
interpolate_without_html_safe(*args) click to toggle source
Alias for: %

[Validate]

Generated with the Darkfish Rdoc Generator 2.