Sha256: 6fb602999cce420af545bb5fd258f9c23c7ced3ad9dd82c3a35349141051c809

Contents?: true

Size: 549 Bytes

Versions: 12

Compression:

Stored size: 549 Bytes

Contents

module SimpleAuth
  class Railtie < Rails::Railtie
    generators do
      require "simple_auth/generator"
    end

    initializer "simple_auth.initialize" do |app|
      ::ActionController::Base.instance_eval do
        include SimpleAuth::ActionController
        helper SimpleAuth::Helper
        prepend_before_filter :activate_simple_auth
        helper_method :current_user, :current_session, :logged_in?
      end

      ::ActiveRecord::Base.class_eval { include SimpleAuth::Orm::ActiveRecord } if defined?(::ActiveRecord)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
simple_auth-1.5.0 lib/simple_auth/railtie.rb
simple_auth-1.4.5 lib/simple_auth/railtie.rb
simple_auth-1.4.4 lib/simple_auth/railtie.rb
simple_auth-1.4.3 lib/simple_auth/railtie.rb
simple_auth-1.4.2 lib/simple_auth/railtie.rb
simple_auth-1.4.1 lib/simple_auth/railtie.rb
simple_auth-1.4.0 lib/simple_auth/railtie.rb
simple_auth-1.3.3 lib/simple_auth/railtie.rb
simple_auth-1.3.2 lib/simple_auth/railtie.rb
simple_auth-1.3.1 lib/simple_auth/railtie.rb
simple_auth-1.3.0 lib/simple_auth/railtie.rb
simple_auth-1.2.0 lib/simple_auth/railtie.rb