Integrate with Active Job via GlobalID
mainAssociated Objects include GlobalID::Identification, allowing you to pass the PORO directly to Active Job. The job will automatically serialize/deserialize the object by finding the parent record and its associated object.
class Post::Publisher < ActiveRecord::AssociatedObject
class PublishJob < ApplicationJob
def perform(publisher) = publisher.publish
end
def publish_later
PublishJob.perform_later(self)
end
end