Sha256: 8ee49bb2f561f7c4aacff36fbd3667777c1b98d584cae3ad1f1680c6ea632742

Contents?: true

Size: 447 Bytes

Versions: 5

Compression:

Stored size: 447 Bytes

Contents

module AuthN
  # The AuthN engine takes care of extending ActiveRecord (if used) and ActionController,
  # With the plugin logic.
  class Engine < ::Rails::Engine
    config.authn = AuthN.config

    initializer "Extend ActionController with AuthN" do |app|
      ActionController::Base.send :include, AuthN::Session
      ActionController::Base.helper_method :current_user
      ActionController::Base.helper_method :logged_in?
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
authn-rails-1.7.3 lib/authn/rails/engine.rb
authn-rails-1.7.2 lib/authn/rails/engine.rb
authn-rails-1.4.2 lib/authn/rails/engine.rb
authn-rails-1.3.2 lib/authn/rails/engine.rb
authn-rails-1.1.0 lib/authn/rails/engine.rb