instance method
set_content_type
Ruby on Rails 6.0.6
Since v5.2.8.1 PrivateSignature
set_content_type(content_type, charset)
No documentation comment.
Parameters
-
content_typereq -
charsetreq
Source
# File actionpack/lib/action_dispatch/http/response.rb, line 444
def set_content_type(content_type, charset)
type = (content_type || "").dup
type << "; charset=#{charset.to_s.downcase}" if charset
set_header CONTENT_TYPE, type
end
Defined in actionpack/lib/action_dispatch/http/response.rb line 444
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Response