lib/clearance/engine.rb in clearance-1.8.1 vs lib/clearance/engine.rb in clearance-1.9.0
- old
+ new
@@ -1,12 +1,19 @@
-require 'clearance'
-require 'rails'
+require "clearance"
+require "rails"
module Clearance
class Engine < Rails::Engine
- initializer 'clearance.filter' do |app|
+ initializer "clearance.filter" do |app|
app.config.filter_parameters += [:password, :token]
end
- config.app_middleware.insert_after ActionDispatch::ParamsParser, Clearance::RackSession
+ config.app_middleware.insert_after(
+ ActionDispatch::ParamsParser,
+ Clearance::RackSession
+ )
+
+ config.to_prepare do
+ Clearance.configuration.reload_user_model
+ end
end
end