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
|
||||
|
||||
def redirect_url
|
||||
if [:html, :"*/*", "*/*"].include? request_format
|
||||
#if is_navigational_format?
|
||||
#if request_format == :html
|
||||
if skip_format?
|
||||
send(:"new_#{scope}_session_path")
|
||||
else
|
||||
send(:"new_#{scope}_session_path", :format => request_format)
|
||||
end
|
||||
end
|
||||
|
||||
def skip_format?
|
||||
%w(html */*).include? request_format.to_s
|
||||
end
|
||||
|
||||
# Choose whether we should respond in a http authentication fashion,
|
||||
# including 401 and optional headers.
|
||||
#
|
||||
|
|
Loading…
Add table
Reference in a new issue