aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/README
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-07-06 08:22:56 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-07-06 08:22:56 +0000
commit2789b5d2cefb4765e5bd2d14b10109cfe2d7f96b (patch)
tree4ecabf74653acb358d5bf9cf033695121d1502d8 /actionmailer/README
parent8dbaae6012c8aa71c811eb42e7a7ac32a36e2080 (diff)
downloadrails-2789b5d2cefb4765e5bd2d14b10109cfe2d7f96b.tar.gz
rails-2789b5d2cefb4765e5bd2d14b10109cfe2d7f96b.tar.bz2
rails-2789b5d2cefb4765e5bd2d14b10109cfe2d7f96b.zip
Tuned documentation for release (AM)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1726 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer/README')
-rwxr-xr-xactionmailer/README11
1 files changed, 5 insertions, 6 deletions
diff --git a/actionmailer/README b/actionmailer/README
index d512f04031..e0d5840c6f 100755
--- a/actionmailer/README
+++ b/actionmailer/README
@@ -16,16 +16,15 @@ in methods on the service layer. Subject, recipients, sender, and timestamp
are all set up this way. An example of such a method:
def signed_up(recipient)
- @recipients = recipient
- @subject = "[Signed up] Welcome #{recipient}"
- @from = "system@loudthinking.com"
- @sent_on = Time.local(2004, 12, 12)
+ recipients recipient
+ subject "[Signed up] Welcome #{recipient}"
+ from "system@loudthinking.com"
- @body["recipient"] = recipient
+ body(:recipient => recipient)
end
The body of the email is created by using an Action View template (regular
-ERb) that has the content of the @body hash available as instance variables.
+ERb) that has the content of the body hash parameter available as instance variables.
So the corresponding body template for the method above could look like this:
Hello there,