mirror of
https://github.com/heartcombo/devise.git
synced 2026-05-02 03:01:49 -04:00
Bring back behavior for < 3.0.4.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user