Devise Async
Devise Async provides an easy way to configure Devise to send its emails asynchronously using ActiveJob.
Installation
Add this line to your application's Gemfile:
gem 'devise-async'
And then execute:
$ bundle
Or install it yourself as:
$ gem install devise-async
Usage
- Setup ActiveJob,
- Add
:async
to thedevise
call in your model:
class User < ActiveRecord::Base
devise :database_authenticatable, :async, :confirmable # etc ...
end
Options
Enabling via config
The gem can be enabled/disabled easily via config, for example based on environment.
# config/initializers/devise_async.rb
Devise::Async.enabled = true #