aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZachary Scott <zachary@zacharyscott.net>2013-05-12 22:27:40 -0400
committerZachary Scott <zachary@zacharyscott.net>2013-05-12 22:27:40 -0400
commitd790b50db4b0e605a915b4a4af5f81acae7b6094 (patch)
tree8822a580f9a07ca490750e78dfd94dcc613d7aaf
parentd8b8c0ef8717508c01ab21687666941008413906 (diff)
downloadrails-d790b50db4b0e605a915b4a4af5f81acae7b6094.tar.gz
rails-d790b50db4b0e605a915b4a4af5f81acae7b6094.tar.bz2
rails-d790b50db4b0e605a915b4a4af5f81acae7b6094.zip
Document ActionMailer::Base#set_content_type
-rw-r--r--actionmailer/lib/action_mailer/base.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index d2e01cfd4c..d68182c0ff 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -720,6 +720,15 @@ module ActionMailer
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