diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2012-12-21 15:42:47 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2012-12-21 16:29:47 -0800 |
commit | f9da785d0b1b22317cfca25c15fb555e9016accb (patch) | |
tree | f54e2174e9388ebb51bc32ed9ba1aa7cc7d95a32 /guides/source/action_mailer_basics.md | |
parent | 10c0a3bd113c41f44fc025d2d042da95e9d8ea1f (diff) | |
download | rails-f9da785d0b1b22317cfca25c15fb555e9016accb.tar.gz rails-f9da785d0b1b22317cfca25c15fb555e9016accb.tar.bz2 rails-f9da785d0b1b22317cfca25c15fb555e9016accb.zip |
Move background jobs to the 'jobs' branch until fully baked. Not shipping with Rails 4.0.
Diffstat (limited to 'guides/source/action_mailer_basics.md')
-rw-r--r-- | guides/source/action_mailer_basics.md | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/guides/source/action_mailer_basics.md b/guides/source/action_mailer_basics.md index 6bb3439e5e..795afd0150 100644 --- a/guides/source/action_mailer_basics.md +++ b/guides/source/action_mailer_basics.md @@ -575,26 +575,3 @@ end ``` In the test we send the email and store the returned object in the `email` variable. We then ensure that it was sent (the first assert), then, in the second batch of assertions, we ensure that the email does indeed contain what we expect. - -Asynchronous ------------- - -Rails provides a Synchronous Queue by default. If you want to use an Asynchronous one you will need to configure an async Queue provider like Resque. Queue providers are supposed to have a Railtie where they configure it's own async queue. - -### Custom Queues - -If you need a different queue than `Rails.queue` for your mailer you can use `ActionMailer::Base.queue=`: - -```ruby -class WelcomeMailer < ActionMailer::Base - self.queue = MyQueue.new -end -``` - -or adding to your `config/environments/$RAILS_ENV.rb`: - -```ruby -config.action_mailer.queue = MyQueue.new -``` - -Your custom queue should expect a job that responds to `#run`. |