2009-11-03 06:35:11 -05:00
|
|
|
require 'devise/rails/routes'
|
2010-02-16 08:57:10 -05:00
|
|
|
require 'devise/rails/warden_compat'
|
|
|
|
|
|
|
|
module Devise
|
|
|
|
class Engine < ::Rails::Engine
|
2010-03-30 05:08:16 -04:00
|
|
|
config.devise = Devise
|
|
|
|
|
2010-03-10 08:59:57 -05:00
|
|
|
initializer "devise.add_middleware" do |app|
|
|
|
|
app.config.middleware.use Warden::Manager do |config|
|
2010-03-31 16:04:48 -04:00
|
|
|
Devise.warden_config = config
|
|
|
|
config.failure_app = Devise::FailureApp
|
|
|
|
config.default_scope = Devise.default_scope
|
2010-03-10 08:59:57 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
initializer "devise.add_url_helpers" do |app|
|
2010-03-10 10:59:22 -05:00
|
|
|
Devise::FailureApp.send :include, app.routes.url_helpers
|
2010-02-16 08:57:10 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|