Method: ActionController::Response#content_type
- Defined in:
- lib/action_controller/response.rb
#content_type ⇒ Object
Returns the response’s content MIME type, or nil if content type has been set.
77 78 79 80 |
# File 'lib/action_controller/response.rb', line 77 def content_type content_type = String(headers["Content-Type"] || headers["type"]).split(";")[0] content_type.blank? ? nil : content_type end |