Refactor.

This commit is contained in:
José Valim 2011-04-29 14:11:47 +02:00
parent b03c93c4fe
commit b5190d8df2
1 changed files with 5 additions and 3 deletions

View File

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