mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Refactor.
This commit is contained in:
parent
b03c93c4fe
commit
b5190d8df2
1 changed files with 5 additions and 3 deletions
|
@ -65,15 +65,17 @@ module Devise
|
||||||
end
|
end
|
||||||
|
|
||||||
def redirect_url
|
def redirect_url
|
||||||
if [:html, :"*/*", "*/*"].include? request_format
|
if skip_format?
|
||||||
#if is_navigational_format?
|
|
||||||
#if request_format == :html
|
|
||||||
send(:"new_#{scope}_session_path")
|
send(:"new_#{scope}_session_path")
|
||||||
else
|
else
|
||||||
send(:"new_#{scope}_session_path", :format => request_format)
|
send(:"new_#{scope}_session_path", :format => request_format)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def skip_format?
|
||||||
|
%w(html */*).include? request_format.to_s
|
||||||
|
end
|
||||||
|
|
||||||
# Choose whether we should respond in a http authentication fashion,
|
# Choose whether we should respond in a http authentication fashion,
|
||||||
# including 401 and optional headers.
|
# including 401 and optional headers.
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue