diff options
Diffstat (limited to 'actionmailer')
-rw-r--r-- | actionmailer/CHANGELOG.md | 4 | ||||
-rw-r--r-- | actionmailer/README.rdoc | 16 | ||||
-rw-r--r-- | actionmailer/lib/rails/generators/mailer/USAGE | 2 |
3 files changed, 13 insertions, 9 deletions
diff --git a/actionmailer/CHANGELOG.md b/actionmailer/CHANGELOG.md index e29890f2d8..68b34805ff 100644 --- a/actionmailer/CHANGELOG.md +++ b/actionmailer/CHANGELOG.md @@ -27,4 +27,8 @@ * Asynchronously send messages via the Rails Queue *Brian Cardarella* +* Allow callbacks to be defined in mailers similar to `ActionController::Base`. You can configure default + settings, headers, attachments, delivery settings or change delivery using + `before_filter`, `after_filter` etc. *Justin S. Leitgeb* + Please check [3-2-stable](https://github.com/rails/rails/blob/3-2-stable/actionmailer/CHANGELOG.md) for previous changes. 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 } diff --git a/actionmailer/lib/rails/generators/mailer/USAGE b/actionmailer/lib/rails/generators/mailer/USAGE index 9f1d6b182e..7470289fd3 100644 --- a/actionmailer/lib/rails/generators/mailer/USAGE +++ b/actionmailer/lib/rails/generators/mailer/USAGE @@ -13,6 +13,6 @@ Example: creates a Notifications mailer class, views, test, and fixtures: Mailer: app/mailers/notifications.rb Views: app/views/notifications/signup.erb [...] - Test: test/functional/notifications_test.rb + Test: test/mailers/notifications_test.rb Fixtures: test/fixtures/notifications/signup [...] |