aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-07-06 22:51:31 -0300
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-07-06 22:51:32 -0300
commit3009c63da6eb4cb18a6f90b39562945d299b1c85 (patch)
treee25f698112f5a826bf1e0015175bc876f59cc91f /actionmailer/lib
parent842f27dd8227289ab4fd232bf89944584ad38fae (diff)
downloadrails-3009c63da6eb4cb18a6f90b39562945d299b1c85.tar.gz
rails-3009c63da6eb4cb18a6f90b39562945d299b1c85.tar.bz2
rails-3009c63da6eb4cb18a6f90b39562945d299b1c85.zip
Improve docs, changelog and release notes for Action Mailer default_options=
[ci skip]
Diffstat (limited to 'actionmailer/lib')
-rw-r--r--actionmailer/lib/action_mailer/base.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index ea9a08102f..150d435140 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -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 @@ module ActionMailer #:nodoc:
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,