mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Be a good citizen and always set the controller action, even if Devise is never calling the failure app through warden.
This commit is contained in:
parent
609a83a76c
commit
193250711d
1 changed files with 6 additions and 0 deletions
|
@ -32,6 +32,12 @@ Warden::Manager.serialize_from_session do |klass, id|
|
|||
klass.find(id)
|
||||
end
|
||||
|
||||
# Be a good citizen and always set the controller action, even if Devise is
|
||||
# never calling the failure app through warden.
|
||||
Warden::Manager.before_failure do |env, opts|
|
||||
env['warden'].request.params['action'] = 'new'
|
||||
end
|
||||
|
||||
# Adds Warden Manager to Rails middleware stack, configuring default devise
|
||||
# strategy and also the controller who will manage not authenticated users.
|
||||
Rails.configuration.middleware.use Warden::Manager do |manager|
|
||||
|
|
Loading…
Reference in a new issue