mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Bring back behavior for < 3.0.4.
This commit is contained in:
parent
0c5acc6f38
commit
7113beac81
1 changed files with 9 additions and 1 deletions
|
@ -128,8 +128,16 @@ module Devise
|
|||
session["#{scope}_return_to"] = attempted_path if request.get? && !http_auth?
|
||||
end
|
||||
|
||||
MIME_REFERENCES = Mime::HTML.respond_to?(:ref)
|
||||
|
||||
def request_format
|
||||
@request_format ||= request.format.respond_to?(:ref) ? request.format.ref : request.format
|
||||
@request_format ||= if request.format.respond_to?(:ref)
|
||||
request.format.ref
|
||||
elsif MIME_REFERENCES
|
||||
request.format
|
||||
else # Rails < 3.0.4
|
||||
request.format.to_sym
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue