1
0
Fork 0
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:
José Valim 2010-07-05 15:22:44 +02:00
parent 35923c9c69
commit dd612753f9

View file

@ -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