mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-10 08:08:00 -05:00
Load Devise ORM after initialization.
This commit is contained in:
@@ -8,5 +8,9 @@ module Devise
|
||||
config.middleware.use Warden::Manager do |config|
|
||||
Devise.configure_warden(config)
|
||||
end
|
||||
|
||||
config.after_initialize do
|
||||
require "devise/orm/#{Devise.orm}"
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -3,8 +3,6 @@ module ActionDispatch::Routing
|
||||
# Ensure Devise modules are included only after loading routes, because we
|
||||
# need devise_for mappings already declared to create magic filters and
|
||||
# helpers.
|
||||
#
|
||||
# TODO Hook into initializers workflow
|
||||
def finalize_with_devise!
|
||||
finalize_without_devise!
|
||||
return if Devise.mappings.empty?
|
||||
|
||||
Reference in New Issue
Block a user