Skip to content

Commit

Permalink
Merge pull request NoamB#269 from xpepermint/master
Browse files Browse the repository at this point in the history
Adding the delayed_job integration instructions
  • Loading branch information
NoamB committed Apr 21, 2012
2 parents caa3622 + 29e7e70 commit 0ecc67f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.rdoc
Expand Up @@ -118,6 +118,26 @@ add them to the initializer file.
Inside the initializer, the comments will tell you what each setting does.


== DelayedJob Integration

By default emails are sent synchronously. You can send them asynchronously by using the
[delayed_job gem](https://github.com/collectiveidea/delayed_job).

After implementing the `delayed_job` into your project add the code below at the end of
the `config/initializers/sorcery.rb` file. After that all emails will be sent asynchronously.

module Sorcery
module Model
module InstanceMethods
def generic_send_email(method, mailer)
config = sorcery_config
mail = config.send(mailer).delay.send(config.send(method), self)
end
end
end
end


== Full Features List by module:


Expand Down

0 comments on commit 0ecc67f

Please sign in to comment.