mirror of
https://github.com/heartcombo/devise.git
synced 2026-04-28 03:00:29 -04:00
Extract redirect_url from failure app to its own method.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user