I am trying to set up Active Job with Rails 4 and Devise. I'm open to any tutorial, if there is any (couldn't find through my searching.)
I know there is a Devise Async gem, but it does not cover Active Job in it. That said, I found this gem that is fresh in development, but I'm getting an uninitialized constant Devise::Async::Backend::Base (NameError)
error. (Could be me being airy on implementing it).
Any suggestions are welcomed. I'm hoping I don't have to create new controller methods.
Active Job is a framework for declaring jobs and making them run on a variety of queuing backends. These jobs can be everything from regularly scheduled clean-ups, to billing charges, to mailings. Anything that can be chopped up into small units of work and run in parallel, really.
Devise is an excellent authentication system made for Rails that allows us to easily drop-in User functionality into our project. Devise only includes an email and password for registration, let's also add our own username to our User model. We also want to have a unique index on our username.
You can include the following code in your desired model (normally User
):
def send_devise_notification(notification, *args)
devise_mailer.send(notification, self, *args).deliver_later
end
You can take a look at the following page for more detail: http://www.sitepoint.com/devise-authentication-in-depth/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With