Module: Stagehand::Staging::Controller

Extended by:
ActiveSupport::Concern
Includes:
ControllerExtensions
Defined in:
lib/stagehand/staging/controller.rb

Instance Method Summary collapse

Instance Method Details

#stage_changes(subject_record = nil, &block) ⇒ Object

Creates a stagehand commit to log database changes associated with the given record



12
13
14
# File 'lib/stagehand/staging/controller.rb', line 12

def stage_changes(subject_record = nil, &block)
  Staging::Commit.capture(subject_record, &block)
end

#sync_record(record) ⇒ Object

Syncs the given record and all affected records to the production database



17
18
19
# File 'lib/stagehand/staging/controller.rb', line 17

def sync_record(record)
  Stagehand::Staging::Synchronizer.sync_record(record)
end