Sha256: d684760369fe74ad2e0b8cfd85fa01f1143ad31f0b36add7c7aab013338a6e33

Contents?: true

Size: 532 Bytes

Versions: 4

Compression:

Stored size: 532 Bytes

Contents

module ActionController
  class Base

    around_filter :prepare_rich_i18n
    
    def prepare_rich_i18n
      String.clear_translations
      ::Rich::I18n::Engine.current_controller = self
      yield
    ensure
      ::Rich::I18n::Engine.current_controller = nil
    end
    
    view_path = File.join File.dirname(__FILE__), "..", "..", "..", "..", "app", "views"
    if respond_to? :append_view_path
      self.append_view_path view_path
    elsif respond_to? :view_paths
      self.view_paths << view_path
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rich_i18n-1.2.3 lib/rich/i18n/actionpack/action_controller/base.rb
rich_i18n-1.2.2 lib/rich/i18n/actionpack/action_controller/base.rb
rich_i18n-1.2.1 lib/rich/i18n/actionpack/action_controller/base.rb
rich_i18n-1.2.0 lib/rich/i18n/actionpack/action_controller/base.rb