Flowdock
method

assign_default_content_type_and_charset!

Importance_0
v3.0.5 - Show latest stable - 0 notes - Class: ActionDispatch::Response
assign_default_content_type_and_charset!() private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_dispatch/http/response.rb, line 185
      def assign_default_content_type_and_charset!
        return if headers[CONTENT_TYPE].present?

        @content_type ||= Mime::HTML
        @charset      ||= self.class.default_charset

        type = @content_type.to_s.dup
        type << "; charset=#{@charset}" unless @sending_file

        headers[CONTENT_TYPE] = type
      end
Register or log in to add new notes.