Sha256: 64a588499089b184633b735c392b855751c968ab7fa2b8d061afa99c44d0c6c2
Contents?: true
Size: 742 Bytes
Versions: 1
Compression:
Stored size: 742 Bytes
Contents
module Devise module Async module Backend class Base def self.enqueue(*args) raise NotImplementedError, "Any DeviseAssync::Backend subclass should implement `self.enqueue`." end # 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. def perform(method, resource_class, resource_id, opts) resource = resource_class.constantize.to_adapter.get!(resource_id) mailer_class.send(method, resource, opts).deliver end private def mailer_class @mailer_class ||= Devise.mailer end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
devise-async-0.6.0 | lib/devise/async/backend/base.rb |