Sha256: 845e0942f32b8b9f6f3ba8f58a4ecd4fee0cbbdbecd820710c2b71eab71d2fc6

Contents?: true

Size: 530 Bytes

Versions: 6

Compression:

Stored size: 530 Bytes

Contents

require 'sorcery'
require 'rails'

module Sorcery
  # The Sorcery engine takes care of extending ActiveRecord (if used) and ActionController,
  # With the plugin logic.
  class Engine < Rails::Engine
    config.sorcery = ::Sorcery::Controller::Config
    
    initializer "extend Controller with sorcery" do |app|
      ActionController::Base.send(:include, Sorcery::Controller)
      ActionController::Base.helper_method :current_user
    end
    
    rake_tasks do
      load "sorcery/railties/tasks.rake"
    end
    
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sorcery-0.6.1 lib/sorcery/engine.rb
sorcery-0.6.0 lib/sorcery/engine.rb
sorcery-0.5.30 lib/sorcery/engine.rb
sorcery-0.5.3 lib/sorcery/engine.rb
sorcery-0.5.21 lib/sorcery/engine.rb
sorcery-0.5.2 lib/sorcery/engine.rb