Module: Draper::Compatibility::GlobalID
- Extended by:
- ActiveSupport::Concern
- Included in:
- Decorator
- Defined in:
- lib/draper/compatibility/global_id.rb
Overview
Active Job allows you to pass ActiveRecord objects to background tasks directly and performs the necessary serialization and deserialization. In order to do this, arguments to a background job must implement Global ID.
This compatibility patch implements Global ID for decorated objects by delegating to the object that is decorated. This means you can pass decorated objects to background jobs, but the object won't be decorated when it is deserialized. This patch is meant as an intermediate fix until we can find a way to deserialize the decorated object correctly.