mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Extract redirect_url from failure app to its own method.
This commit is contained in:
parent
35923c9c69
commit
dd612753f9
1 changed files with 5 additions and 1 deletions
|
@ -47,7 +47,7 @@ module Devise
|
|||
def redirect
|
||||
store_location!
|
||||
flash[:alert] = i18n_message unless flash[:notice]
|
||||
redirect_to send(:"new_#{scope}_session_path")
|
||||
redirect_to redirect_url
|
||||
end
|
||||
|
||||
protected
|
||||
|
@ -63,6 +63,10 @@ module Devise
|
|||
end
|
||||
end
|
||||
|
||||
def redirect_url
|
||||
send(:"new_#{scope}_session_path")
|
||||
end
|
||||
|
||||
def http_auth?
|
||||
!Devise.navigational_formats.include?(request.format.to_sym) || request.xhr?
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue