Use autoload to pre-load components (so they still work when rubygems are disabled)
This commit is contained in:
parent
153cc759ae
commit
c711a9d1b5
|
@ -1,4 +1,8 @@
|
|||
module Devise
|
||||
autoload :Schema, 'devise/schema'
|
||||
autoload :Mapping, 'devise/mapping'
|
||||
autoload :FailureApp, 'devise/failure_app'
|
||||
|
||||
ALL = [:authenticatable, :confirmable, :recoverable, :rememberable,
|
||||
:timeoutable, :trackable, :validatable].freeze
|
||||
|
||||
|
@ -144,6 +148,8 @@ end
|
|||
# Set the default_scope to nil, so it's overwritten when the first route is declared.
|
||||
Warden::Manager.default_scope = nil
|
||||
|
||||
require 'devise/controllers'
|
||||
require 'devise/encryptors'
|
||||
require 'devise/strategies/base'
|
||||
require 'devise/serializers/base'
|
||||
require 'devise/rails'
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
module Devise
|
||||
module Controllers
|
||||
autoload :Filters, 'devise/controllers/filters'
|
||||
autoload :Helpers, 'devise/controllers/helpers'
|
||||
autoload :UrlHelpers, 'devise/controllers/url_helpers'
|
||||
end
|
||||
end
|
|
@ -0,0 +1,9 @@
|
|||
module Devise
|
||||
module Encryptors
|
||||
autoload :AuthlogicSha512, 'devise/encryptors/authlogic_sha512'
|
||||
autoload :AuthlogicSha1, 'devise/encryptors/authlogic_sha1'
|
||||
autoload :RestfulAuthenticationSha1, 'devise/encryptors/restful_authentication_sha1'
|
||||
autoload :Sha512, 'devise/encryptors/sha512'
|
||||
autoload :Sha1, 'devise/encryptors/sha1'
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue