Permalink
Browse files

Document ActionMailer::Base#set_content_type

  • Loading branch information...
1 parent d8b8c0e commit d790b50db4b0e605a915b4a4af5f81acae7b6094 @zzak zzak committed May 13, 2013
Showing with 9 additions and 0 deletions.
  1. +9 −0 actionmailer/lib/action_mailer/base.rb
@@ -720,6 +720,15 @@ def mail(headers = {}, &block)
protected
+ # Used by #mail to set the content type of the message.
+ #
+ # It will use the given +user_content_type+, or multipart if the mail
+ # message has any attachments. If the attachments are inline, the content
+ # type will be "multipart/related", otherwise "multipart/mixed".
+ #
+ # If there is no content type passed in via headers, and there are no
+ # attachments, or the message is multipart, then the default content type is
+ # used.
def set_content_type(m, user_content_type, class_default)
params = m.content_type_parameters || {}
case

0 comments on commit d790b50

Please sign in to comment.