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