Code Monkey home page Code Monkey logo

devise-async's Introduction

Devise Async

Tag Build Status Code Climate

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

  1. Setup ActiveJob,
  2. Add :async to the devise 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 # | false

Setup via block

To avoid repeating Devise::Async in the initializer file you can use the block syntax similar to what Devise offers.

# config/initializers/devise_async.rb
Devise::Async.setup do |config|
  config.enabled = true
end

Custom mailer class

Customize Devise.mailer at will and devise-async will honor it.

Older versions of Rails and devise

If you want to use this gem with Rails < 5 and/or devise < 4 check out older releases, please.

Testing

RSpec is used for testing. The following should be enough for running the test:

$ bundle exec rspec

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

Released under the MIT License. See the LICENSE file for further details.

devise-async's People

Contributors

mhfs avatar glebm avatar mohamagdy avatar rymai avatar astjohn avatar jandudulski avatar jigfox avatar kmayer avatar barelyknown avatar tak1n avatar bradpsheehan avatar denniskuczynski avatar jperville avatar mkon avatar weaksauce avatar pranas avatar djsegal avatar

Watchers

James Cloos avatar Maciej Jarmuła avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.