Sha256: 9287ee1012b52c37e8af030b9aa88175e8462eed51b19e58acb6c77a1b11df67
Contents?: true
Size: 518 Bytes
Versions: 32
Compression:
Stored size: 518 Bytes
Contents
class EventImportFileStateMachine include Statesman::Machine state :pending, initial: true state :started state :completed state :failed transition from: :pending, to: :started transition from: :started, to: [:completed, :failed] after_transition(from: :pending, to: :started) do |event_import_file| event_import_file.update_column(:executed_at, Time.zone.now) end before_transition(from: :started, to: :completed) do |event_import_file| event_import_file.error_message = nil end end
Version data entries
32 entries across 32 versions & 1 rubygems