Parent

Devise::Async::Backend::Base

Public Class Methods

enqueue(*args) click to toggle source
# File lib/devise/async/backend/base.rb, line 5
def self.enqueue(*args)
  raise NotImplementedError, "Any DeviseAssync::Backend subclass should implement `self.enqueue`."
end

Public Instance Methods

perform(method, resource_class, resource_id, *args) click to toggle source

Loads the resource record and sends the email.

It uses `orm_adapter` API to fetch the record in order to enforce compatibility among diferent ORMs.

# File lib/devise/async/backend/base.rb, line 13
def perform(method, resource_class, resource_id, *args)
  resource = resource_class.constantize.to_adapter.get!(resource_id)
  args[-1] = args.last.symbolize_keys if args.last.is_a?(Hash)
  mailer_class(resource).send(method, resource, *args).deliver
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.