Skip to content

Commit

Permalink
Add action_mailer observer and interceptors configuration options
Browse files Browse the repository at this point in the history
  • Loading branch information
Paco Guzman committed Jun 7, 2011
1 parent 366ffd8 commit 5acf76d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
8 changes: 4 additions & 4 deletions actionmailer/lib/action_mailer/base.rb
Expand Up @@ -213,14 +213,14 @@ module ActionMailer #:nodoc:
# = Observing and Intercepting Mails
#
# Action Mailer provides hooks into the Mail observer and interceptor methods. These allow you to
# register objects that are called during the mail delivery life cycle.
# register classes that are called during the mail delivery life cycle.
#
# An observer object must implement the <tt>:delivered_email(message)</tt> method which will be
# An observer class must implement the <tt>:delivered_email(message)</tt> method which will be
# called once for every email sent after the email has been sent.
#
# An interceptor object must implement the <tt>:delivering_email(message)</tt> method which will be
# An interceptor class must implement the <tt>:delivering_email(message)</tt> method which will be
# called before the email is sent, allowing you to make modifications to the email before it hits
# the delivery agents. Your object should make any needed modifications directly to the passed
# the delivery agents. Your class should make any needed modifications directly to the passed
# in Mail::Message instance.
#
# = Default Hash
Expand Down
12 changes: 11 additions & 1 deletion railties/guides/source/configuring.textile
Expand Up @@ -364,7 +364,17 @@ There are a number of settings available on +config.action_mailer+:
:parts_order => [ "text/plain", "text/enriched", "text/html" ]
</ruby>

h4. Configuring Active Resource
* +config.action_mailer.observers+ registers observers which will be notified when mail is delivered.
<ruby>
config.active_record.observers = ["MailObserver"]
</ruby>

* +config.action_mailer.interceptors+ registers interceptors which will be called before mail is sent.
<ruby>
config.active_record.interceptors = ["MailInterceptor"]
</ruby>

h4. Configuring Active Resource

There is a single configuration setting available on +config.active_resource+:

Expand Down

0 comments on commit 5acf76d

Please sign in to comment.