Permalink
Browse files

Improve docs, changelog and release notes for Action Mailer default_o…

…ptions=

[ci skip]
  • Loading branch information...
carlosantoniodasilva committed Jul 7, 2012
1 parent 842f27d commit 3009c63da6eb4cb18a6f90b39562945d299b1c85
@@ -1,11 +1,11 @@
## Rails 4.0.0 (unreleased) ##
+* Allow to set default Action Mailer options via `config.action_mailer.default_options=` *Robert Pankowecki*
+
* Raise an `ActionView::MissingTemplate` exception when no implicit template could be found. *Damien Mathieu*
* Asynchronously send messages via the Rails Queue *Brian Cardarella*
-* Set default Action Mailer options via config.action_mailer.default_options= *Robert Pankowecki*
-
## Rails 3.2.5 (Jun 1, 2012) ##
* No changes.
@@ -278,6 +278,11 @@ module ActionMailer #:nodoc:
# set something in the defaults using a proc, and then set the same thing inside of your
# mailer method, it will get over written by the mailer method.
#
+ # It is also possible to set these default options that will be used in all mailers through
+ # the <tt>default_options=</tt> configuration in <tt>config/application.rb</tt>:
+ #
+ # config.action_mailer.default_options = { from: "no-reply@example.org" }
+ #
# = Callbacks
#
# You can specify callbacks using before_filter and after_filter for configuring your messages.
@@ -421,8 +426,9 @@ def default(value = nil)
self.default_params = default_params.merge(value).freeze if value
default_params
end
- #Alias so that we can use it in config/application.rb which requires setters
- #: config.action_mailer.default_options = {from: "no-replay@example.org"}
+ # Allows to set defaults through app configuration:
+ #
+ # config.action_mailer.default_options = { from: "no-reply@example.org" }
alias :default_options= :default
# Receives a raw email, parses it into an email object, decodes it,
@@ -112,6 +112,8 @@ h4(#railties_deprecations). Deprecations
h3. Action Mailer
+* Allow to set default Action Mailer options via <tt>config.action_mailer.default_options=</tt>.
+
* Raise an <tt>ActionView::MissingTemplate</tt> exception when no implicit template could be found.
* Asynchronously send messages via the Rails Queue.
@@ -424,12 +424,12 @@ There are a number of settings available on +config.action_mailer+:
* +config.action_mailer.perform_deliveries+ specifies whether mail will actually be delivered and is true by default. It can be convenient to set it to false for testing.
-* +config.action_mailer.default_options+ configures Action Mailer defaults. Use to set options like `from` or `replay_to` for every mailer. These default to:
+* +config.action_mailer.default_options+ configures Action Mailer defaults. Use to set options like `from` or `reply_to` for every mailer. These default to:
<ruby>
:mime_version => "1.0",
:charset => "UTF-8",
:content_type => "text/plain",
-:parts_order => [ "text/plain", "text/enriched", "text/html" ],
+:parts_order => [ "text/plain", "text/enriched", "text/html" ]
</ruby>
* +config.action_mailer.observers+ registers observers which will be notified when mail is delivered.

0 comments on commit 3009c63

Please sign in to comment.