instance method charset=

Ruby on Rails 2.3.18

Since v2.3.18 Last seen in v2.3.18

Signature

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

charset req
Source
# File actionpack/lib/action_controller/response.rb, line 84
    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 84 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionController::Response

Type at least 2 characters to search.

↑↓ navigate · open · esc close