Sha256: 9102312828de5ee6a5b353372a72b2b5506505a9f1be6360a6c80d85e5f27105

Contents?: true

Size: 449 Bytes

Versions: 17

Compression:

Stored size: 449 Bytes

Contents

module RailsTools
  module I18nController
    def set_locale
      I18n.locale = params[:i18n_locale]
    end

    def default_url_options(options = {})
      { :i18n_locale => I18n.locale }
    end


    def self.included(base)
      base.before_filter :set_locale
      base.extend(ClassMethods)
    end

    module ClassMethods
      def self.default_url_options(options = {})
        { :i18n_locale => I18n.locale }
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
ecm_cms-1.0.5.pre lib/rails_tools/i18n_controller.rb
ecm_cms-1.0.4.pre lib/rails_tools/i18n_controller.rb
ecm_cms-1.0.3.pre lib/rails_tools/i18n_controller.rb
ecm_cms-1.0.2.pre lib/rails_tools/i18n_controller.rb
ecm_cms-1.0.1.pre lib/rails_tools/i18n_controller.rb
ecm_cms-1.0.0.pre lib/rails_tools/i18n_controller.rb
ecm_cms-0.0.13.pre lib/rails_tools/i18n_controller.rb
ecm_cms-0.0.11.pre lib/rails_tools/i18n_controller.rb
ecm_cms-0.0.10.pre lib/rails_tools/i18n_controller.rb
ecm_cms-0.0.8.pre lib/rails_tools/i18n_controller.rb
ecm_cms-0.0.7.pre lib/rails_tools/i18n_controller.rb
ecm_cms-0.0.6.pre lib/rails_tools/i18n_controller.rb
ecm_cms-0.0.5.pre lib/rails_tools/i18n_controller.rb
ecm_cms-0.0.4.pre lib/rails_tools/i18n_controller.rb
ecm_cms-0.0.3.pre lib/rails_tools/i18n_controller.rb
ecm_cms-0.0.2.pre lib/rails_tools/i18n_controller.rb
ecm_cms-0.0.1.pre lib/rails_tools/i18n_controller.rb