Module: Sorcery::Controller

Defined in:
lib/sorcery.rb,
lib/sorcery/controller.rb,
lib/sorcery/controller/config.rb,
lib/sorcery/controller/submodules/external.rb,
lib/sorcery/controller/submodules/remember_me.rb,
lib/sorcery/controller/submodules/http_basic_auth.rb,
lib/sorcery/controller/submodules/session_timeout.rb,
lib/sorcery/controller/submodules/activity_logging.rb,
lib/sorcery/controller/submodules/brute_force_protection.rb

Defined Under Namespace

Modules: Config, InstanceMethods, Submodules

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/sorcery/controller.rb', line 3

def self.included(klass)
  klass.class_eval do
    include InstanceMethods
    Config.submodules.each do |mod|
      begin
        include Submodules.const_get(mod.to_s.split('_').map { |p| p.capitalize }.join)
      rescue NameError
        # don't stop on a missing submodule.
      end
    end
  end
  Config.update!
  Config.configure!
end