Sha256: 69354916b4a0dc4abf7d7613366f031dad2836904ce09431265538409b988e88

Contents?: true

Size: 602 Bytes

Versions: 1

Compression:

Stored size: 602 Bytes

Contents

require 'rails/railtie'

module LocaleSetter
  class Railtie < Rails::Railtie
    config.after_initialize do |app|
      # I would prefer to do this in an initializer block, but it's important
      # that we do this _before_ any of the user's authentication stuff
      # happens. So this is the best we can get for now.
      ApplicationController.send(:include, LocaleSetter::Controller)
    end
  end
  module Rails
    def self.included(controller)
      ActiveSupport::Deprecation.warn("You don't need to include LocaleSetter::Rails any more. There's a Railtie for That (tm).")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
locale_setter-0.4.0 lib/locale_setter/railtie.rb