set_content_type(m, user_content_type, class_default) protected

No documentation

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

Hide source
# File actionmailer/lib/action_mailer/base.rb, line 671
    def set_content_type(m, user_content_type, class_default)
      params = m.content_type_parameters || {}
      case
      when user_content_type.present?
        user_content_type
      when m.has_attachments?
        if m.attachments.detect { |a| a.inline? }
          ["multipart", "related", params]
        else
          ["multipart", "mixed", params]
        end
      when m.multipart?
        ["multipart", "alternative", params]
      else
        m.content_type || class_default
      end
    end
Register or log in to add new notes.