Sha256: 3f19f1736ca2ac13a9e4fcfc77fc4ee7b11957fc2da6984cbe2a94db712be9b6

Contents?: true

Size: 345 Bytes

Versions: 1

Compression:

Stored size: 345 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
      @locale = Globalize2Extension.default_language
      Globalize2Extension.content_locale = I18n.locale = @locale.to_sym
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
radiant-globalize2-extension-0.2.1 lib/globalize2/pages_controller_extensions.rb