instance method
content_type
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v2.2.3Signature
content_type()
Returns the response’s content MIME type, or nil if content type has been set.
Source
# File actionpack/lib/action_controller/response.rb, line 74
def content_type
content_type = String(headers["Content-Type"] || headers["type"]).split(";")[0]
content_type.blank? ? nil : content_type
end
Defined in actionpack/lib/action_controller/response.rb line 74
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::AbstractResponse