Module: Stagehand::Staging::Controller
- Extended by:
- ActiveSupport::Concern
- Includes:
- ControllerExtensions
- Defined in:
- lib/stagehand/staging/controller.rb
Instance Method Summary collapse
-
#stage_changes(*args, &block) ⇒ Object
Creates a stagehand commit to log database changes associated with the given record.
-
#sync_checklist(checklist) ⇒ Object
Syncs the checklist’s affected records to the production database.
-
#sync_record(record) ⇒ Object
Syncs the given record and all affected records to the production database.
Instance Method Details
#stage_changes(*args, &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(*args, &block) Staging::Commit.capture(*args, &block) end |
#sync_checklist(checklist) ⇒ Object
Syncs the checklist’s affected records to the production database
22 23 24 |
# File 'lib/stagehand/staging/controller.rb', line 22 def sync_checklist(checklist) Stagehand::Staging::Synchronizer.sync_checklist(checklist) 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 |