Sha256: 38187cb8c0f0c564dc824a566b9159747455e8e704a079ee57dcab13584adb79
Contents?: true
Size: 815 Bytes
Versions: 1
Compression:
Stored size: 815 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, *args) resource = resource_class.constantize.to_adapter.get!(resource_id) args[-1] = args.last.symbolize_keys if args.last.is_a?(Hash) mailer_class.send(method, resource, *args).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.8.0 | lib/devise/async/backend/base.rb |