instance method
charset=
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v2.2.3Signature
charset=(charset)
Set the charset of the Content-Type header. Set to nil to remove it. If no content type is set, it defaults to HTML.
Parameters
-
charsetreq
Source
# File actionpack/lib/action_controller/response.rb, line 81
def charset=(charset)
headers["Content-Type"] =
if charset
"#{content_type || Mime::HTML}; charset=#{charset}"
else
content_type || Mime::HTML.to_s
end
end
Defined in actionpack/lib/action_controller/response.rb line 81
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::AbstractResponse