instance method
set_content_type
Ruby on Rails 8.1.2
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 507
def set_content_type(content_type, charset)
type = content_type || ""
type = "#{type}; charset=#{charset.to_s.downcase}" if charset
set_header CONTENT_TYPE, type
end
Defined in actionpack/lib/action_dispatch/http/response.rb line 507
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Response