Class: ActiveRecordMigrationUi::NotifyMigrationScriptAsRunning
- Inherits:
-
Object
- Object
- ActiveRecordMigrationUi::NotifyMigrationScriptAsRunning
- Includes:
- Interactor
- Defined in:
- app/interactors/active_record_migration_ui/notify_migration_script_as_running.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/interactors/active_record_migration_ui/notify_migration_script_as_running.rb', line 5 def call sanity_checks! # Emit a message through the WebSocket to notify the front that the given # migration script version changes the state to running, which will show # a loader next to the migration script. ActionCable.server.broadcast ActiveRecordMigrationUi.ac_channel_name, command: 'migrate', version: context.version, new_status: 'running' end |