README.md in resque_mailer-2.2.3 vs README.md in resque_mailer-2.2.4

- old
+ new

@@ -5,10 +5,21 @@ for your background jobs. Note that recent (2.0+) versions of Resque::Mailer only work with Rails 3.x. For a version compatible with Rails 2, specify v1.x in your Gemfile. +## Installation + +Install the gem: + + gem install resque_mailer + +If you're using Bundler to manage your dependencies, you should add it to your Gemfile: + + gem 'resque' # or a compatible alternative / fork + gem 'resque_mailer' + ## Usage Include Resque::Mailer in your ActionMailer subclass(es) like this: class MyMailer < ActionMailer::Base @@ -52,25 +63,12 @@ Resque::Mailer.error_handler = lambda { |mailer, message, error| # some custom error handling code here in which you optionally re-raise the error } ``` -### Using with Resque Scheduler +### Resque::Mailer as a Project Default -If [resque-scheduler](https://github.com/bvandenbos/resque-scheduler) is -installed, two extra methods will be available: `deliver_at` and `deliver_in`. -These will enqueue mail for delivery at a specified time in the future. - - # Delivers on the 25th of December, 2013 - MyMailer.reminder_email(params).deliver_at(Time.parse('2013-12-25')) - - # Delivers in 7 days - MyMailer.reminder_email(params).deliver_in(7.days) - - -## Resque::Mailer as a Project Default - If you have a variety of mailers in your application and want all of them to use Resque::Mailer by default, you can subclass ActionMailer::Base and have your other mailers inherit from an AsyncMailer: # config/initializers/resque_mailer.rb @@ -83,19 +81,20 @@ def say_hello(user) # ... end end -## Installation +### Using with Resque Scheduler -Install the gem: +If [resque-scheduler](https://github.com/bvandenbos/resque-scheduler) is +installed, two extra methods will be available: `deliver_at` and `deliver_in`. +These will enqueue mail for delivery at a specified time in the future. - gem install resque_mailer + # Delivers on the 25th of December, 2013 + MyMailer.reminder_email(params).deliver_at(Time.parse('2013-12-25')) -If you're using Bundler to manage your dependencies, you should add it to your Gemfile: - - gem 'resque' # or a compatible alternative / fork - gem 'resque_mailer' + # Delivers in 7 days + MyMailer.reminder_email(params).deliver_in(7.days) ## Testing You don't want to be sending actual emails in the test environment, so you can configure the environments that should be excluded like so: