asciinema.org/config/initializers/warden.rb
2014-02-20 23:31:48 +01:00

13 lines
275 B
Ruby

Warden::Manager.serialize_into_session do |user|
user.id
end
Warden::Manager.serialize_from_session do |id|
User.find_by_id(id)
end
require 'auth_cookie_strategy'
Rails.application.config.middleware.insert_after ActionDispatch::Flash, Warden::Manager do |manager|
end