1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

Refactor.

This commit is contained in:
José Valim 2011-04-29 14:11:47 +02:00
parent b03c93c4fe
commit b5190d8df2

View file

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