Sha256: 137232c95c829467ad8ae718daf2e1d85105c1dc852fd8cb86d10a226ad4bea8
Contents?: true
Size: 545 Bytes
Versions: 47
Compression:
Stored size: 545 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
47 entries across 44 versions & 2 rubygems