aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
authorRobin Dupret <robin.dupret@gmail.com>2012-10-10 13:45:47 +0200
committerRobin Dupret <robin.dupret@gmail.com>2012-10-10 15:14:03 +0200
commitf839e619d48e8101999ad046a5ca632289139b6e (patch)
treec8d87f7f45cb9392b9fa45ada9181dcae30b7f7a /actionmailer
parentb12d04808af92ec10bf9a9d14d512909e1869b18 (diff)
downloadrails-f839e619d48e8101999ad046a5ca632289139b6e.tar.gz
rails-f839e619d48e8101999ad046a5ca632289139b6e.tar.bz2
rails-f839e619d48e8101999ad046a5ca632289139b6e.zip
Use a 1.9 Hash syntax in README files (fixes thanks to @vijaydev)
Diffstat (limited to 'actionmailer')
-rw-r--r--actionmailer/README.rdoc16
1 files changed, 8 insertions, 8 deletions
diff --git a/actionmailer/README.rdoc b/actionmailer/README.rdoc
index cf10bfffdb..59c33b7940 100644
--- a/actionmailer/README.rdoc
+++ b/actionmailer/README.rdoc
@@ -83,7 +83,7 @@ Note that every value you set with this method will get over written if you use
Example:
class AuthenticationMailer < ActionMailer::Base
- default :from => "awesome@application.com", :subject => Proc.new { "E-mail was generated at #{Time.now}" }
+ default from: "awesome@application.com", subject: Proc.new { "E-mail was generated at #{Time.now}" }
.....
end
@@ -100,13 +100,13 @@ Example:
def receive(email)
page = Page.find_by_address(email.to.first)
page.emails.create(
- :subject => email.subject, :body => email.body
+ subject: email.subject, body: email.body
)
if email.has_attachments?
email.attachments.each do |attachment|
page.attachments.create({
- :file => attachment, :description => email.subject
+ file: attachment, description: email.subject
})
end
end
@@ -127,11 +127,11 @@ a limited number of email.
The Base class has the full list of configuration options. Here's an example:
ActionMailer::Base.smtp_settings = {
- :address => 'smtp.yourserver.com', # default: localhost
- :port => '25', # default: 25
- :user_name => 'user',
- :password => 'pass',
- :authentication => :plain # :plain, :login or :cram_md5
+ address: 'smtp.yourserver.com', # default: localhost
+ port: '25', # default: 25
+ user_name: 'user',
+ password: 'pass',
+ authentication: :plain # :plain, :login or :cram_md5
}