Sha256: 18793489193e26e84ccdc63c9a41d0589fe37c599a86b817ddc5e1b39abfd001

Contents?: true

Size: 358 Bytes

Versions: 6

Compression:

Stored size: 358 Bytes

Contents

module Globalize2
  module PagesControllerExtensions
    def self.included(base)
      base.class_eval do
        before_filter :reset_locale, :only => [:new]
      end
    end
    
    def reset_locale
      Globalize2Extension.content_locale = session[:content_locale] = Globalize2Extension.default_language unless params[:content_locale]
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
radiant-globalize2-extension-0.2.7 lib/globalize2/pages_controller_extensions.rb
radiant-globalize2-extension-0.2.6 lib/globalize2/pages_controller_extensions.rb
radiant-globalize2-extension-0.2.5 lib/globalize2/pages_controller_extensions.rb
radiant-globalize2-extension-0.2.4 lib/globalize2/pages_controller_extensions.rb
radiant-globalize2-extension-0.2.3 lib/globalize2/pages_controller_extensions.rb
radiant-globalize2-extension-0.2.2 lib/globalize2/pages_controller_extensions.rb