Skip to content
This repository
Browse code

itsy bitsy changes to ActionMailer documentation

  • Loading branch information...
commit daad4454eb4eeeb76749735490e1b355fcf9e827 1 parent 2df3655
Neeraj Singh authored July 28, 2010

Showing 1 changed file with 11 additions and 14 deletions. Show diff stats Hide diff stats

  1. 25  actionmailer/lib/action_mailer/base.rb
25  actionmailer/lib/action_mailer/base.rb
@@ -41,16 +41,16 @@ module ActionMailer #:nodoc:
41 41
   #   in the same manner as <tt>attachments[]=</tt>
42 42
   #
43 43
   # * <tt>headers[]=</tt> - Allows you to specify any header field in your email such
44  
-  #   as <tt>headers['X-No-Spam'] = 'True'</tt>. Note, while most fields (like <tt>To:</tt>
  44
+  #   as <tt>headers['X-No-Spam'] = 'True'</tt>. Note, while most fields like <tt>To:</tt>
45 45
   #   <tt>From:</tt> can only appear once in an email header, other fields like <tt>X-Anything</tt>
46 46
   #   can appear multiple times. If you want to change a field that can appear multiple times,
47  
-  #   you need to set it to nil first so that Mail knows you are replacing it, not adding
48  
-  #   another field of the same name.)
  47
+  #   you need to set it to nil first so that Mail knows you are replacing it and not adding
  48
+  #   another field of the same name.
49 49
   #
50 50
   # * <tt>headers(hash)</tt> - Allows you to specify multiple headers in your email such
51 51
   #   as <tt>headers({'X-No-Spam' => 'True', 'In-Reply-To' => '1234@message.id'})</tt>
52 52
   #
53  
-  # * <tt>mail</tt> - Allows you to specify your email to send.
  53
+  # * <tt>mail</tt> - Allows you to specify email to be sent.
54 54
   #
55 55
   # The hash passed to the mail method allows you to specify any header that a Mail::Message
56 56
   # will accept (any valid Email header including optional fields).
@@ -66,7 +66,7 @@ module ActionMailer #:nodoc:
66 66
   #     format.html
67 67
   #   end
68 68
   #
69  
-  # The block syntax is useful if also need to specify information specific to a part:
  69
+  # The block syntax is also useful in providing information specific to a part:
70 70
   #
71 71
   #   mail(:to => user.email) do |format|
72 72
   #     format.text(:content_transfer_encoding => "base64")
@@ -121,7 +121,7 @@ module ActionMailer #:nodoc:
121 121
   #
122 122
   #   <%= users_url(:host => "example.com") %>
123 123
   #
124  
-  # You will want to avoid using the <tt>name_of_route_path</tt> form of named routes because it doesn't
  124
+  # You want to avoid using the <tt>name_of_route_path</tt> form of named routes because it doesn't
125 125
   # make sense to generate relative URLs in email messages.
126 126
   #
127 127
   # It is also possible to set a default host that will be used in all mailers by setting the <tt>:host</tt>
@@ -132,7 +132,7 @@ module ActionMailer #:nodoc:
132 132
   # Setting <tt>ActionMailer::Base.default_url_options</tt> directly is now deprecated, use the configuration
133 133
   # option mentioned above to set the default host.
134 134
   #
135  
-  # If you do decide to set a default <tt>:host</tt> for your mailers you will want to use the
  135
+  # If you do decide to set a default <tt>:host</tt> for your mailers you want to use the
136 136
   # <tt>:only_path => false</tt> option when using <tt>url_for</tt>. This will ensure that absolute URLs are
137 137
   # generated because the <tt>url_for</tt> view helper will, by default, generate relative URLs when a
138 138
   # <tt>:host</tt> option isn't explicitly provided.
@@ -154,7 +154,7 @@ module ActionMailer #:nodoc:
154 154
   # detect and use multipart templates, where each template is named after the name of the action, followed
155 155
   # by the content type. Each such detected template will be added as separate part to the message.
156 156
   #
157  
-  # For example, if the following templates existed:
  157
+  # For example, if the following templates exist:
158 158
   # * signup_notification.text.plain.erb
159 159
   # * signup_notification.text.html.erb
160 160
   # * signup_notification.text.xml.builder
@@ -171,8 +171,7 @@ module ActionMailer #:nodoc:
171 171
   #
172 172
   # = Attachments
173 173
   #
174  
-  # You can see above how to make a multipart HTML / Text email, to send attachments is just
175  
-  # as easy:
  174
+  # Sending attachment in emails is easy:
176 175
   #
177 176
   #   class ApplicationMailer < ActionMailer::Base
178 177
   #     def welcome(recipient)
@@ -189,10 +188,8 @@ module ActionMailer #:nodoc:
189 188
   #
190 189
   # = Inline Attachments
191 190
   # 
192  
-  # You can also specify that a file should be displayed inline with other HTML.  For example a 
193  
-  # corporate logo or a photo or the like.
194  
-  # 
195  
-  # To do this is simple, in the Mailer:
  191
+  # You can also specify that a file should be displayed inline with other HTML. This is useful 
  192
+  # if you want to display a corporate logo or a photo.
196 193
   # 
197 194
   #   class ApplicationMailer < ActionMailer::Base
198 195
   #     def welcome(recipient)

0 notes on commit daad445

Please sign in to comment.
Something went wrong with that request. Please try again.