1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00
heartcombo--devise/lib/devise/rails.rb

30 lines
793 B
Ruby
Raw Normal View History

require 'devise/rails/routes'
require 'devise/rails/warden_compat'
module Devise
class Engine < ::Rails::Engine
config.devise = Devise
config.app_middleware.use Warden::Manager do |config|
Devise.warden_config = config
end
# Force routes to be loaded if we are doing any eager load.
config.before_eager_load { |app| app.reload_routes! }
2010-07-18 06:17:04 -04:00
initializer "devise.add_filters" do |app|
app.config.filter_parameters += [:password, :password_confirmation]
app.config.filter_parameters.uniq
end
2010-07-13 04:09:55 -04:00
initializer "devise.url_helpers" do
Devise.include_helpers(Devise::Controllers)
end
initializer "devise.oauth_url_helpers" do
if Devise.oauth_providers.any?
Devise.include_helpers(Devise::Oauth)
end
2010-07-13 04:09:55 -04:00
end
end
end