Module: CollavreLinear::CreativeSyncObserver

Extended by:
ActiveSupport::Concern
Defined in:
app/observers/collavre_linear/creative_sync_observer.rb

Overview

Auto-triggers an outbound Linear sync whenever a Collavre::Creative inside a linked subtree is created, updated, moved, or destroyed.

Mixed into Collavre::Creative via the engine's to_prepare block:

Collavre::Creative.include CollavreLinear::CreativeSyncObserver

which registers after_commit and adds the transient skip_linear_sync accessor.

Loop guard: the inbound applier (Task 10) sets creative.skip_linear_sync = true on records it mutates so the resulting after_commit does NOT bounce a change back to Linear. The flag is a per-record transient attribute (not persisted), so it only suppresses the single in-memory instance that applied the inbound change.