Module: Magic::Presenter::GlobalID

Extended by:
ActiveSupport::Concern
Included in:
Base
Defined in:
lib/magic/presenter/global_id.rb

Overview

Active Job integration

Active Job accepts Active Record objects. An object passed to a background job must implement Global ID.

This module implements Global ID for decorated models by defining .find method that uses the one from a model class and decorates the result. This means one can pass decorated objects to background jobs and get them decorated when deserialized.