Sha256: 183fc3cfb73eca8a104788f63cec1cf6acaebc0aad10da843bb59020cce3daca

Contents?: true

Size: 433 Bytes

Versions: 5

Compression:

Stored size: 433 Bytes

Contents

module ActionView
  class Base

    def rich_i18n
      render :file => File.expand_path("../../../../../../app/views/rich_i18n.html.erb", __FILE__)
    end

    def render_with_rich_i18n(*args, &block)
      (html = render_without_rich_i18n(*args, &block)).include?("<i18n ") ?
        ::Rich::I18n::Actionpack::ActionView::Sanitizor.sanitize_html(html) :
        html
    end
    alias_method_chain :render, :rich_i18n

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rich_i18n-1.3.4 lib/rich/i18n/actionpack/action_view/base.rb
rich_i18n-1.3.3 lib/rich/i18n/actionpack/action_view/base.rb
rich_i18n-1.3.2 lib/rich/i18n/actionpack/action_view/base.rb
rich_i18n-1.3.1 lib/rich/i18n/actionpack/action_view/base.rb
rich_i18n-1.3.0 lib/rich/i18n/actionpack/action_view/base.rb