mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
20 lines
No EOL
496 B
Ruby
20 lines
No EOL
496 B
Ruby
require 'devise/rails/routes'
|
|
require 'devise/rails/warden_compat'
|
|
|
|
module Devise
|
|
class Engine < ::Rails::Engine
|
|
engine_name :devise
|
|
|
|
initializer "devise.add_middleware" do |app|
|
|
app.config.middleware.use Warden::Manager do |config|
|
|
Devise.configure_warden(config)
|
|
end
|
|
end
|
|
|
|
initializer "devise.add_url_helpers" do |app|
|
|
if app.routes.respond_to?(:url_helpers)
|
|
Devise::FailureApp.send :include, app.routes.url_helpers
|
|
end
|
|
end
|
|
end
|
|
end |