Sha256: 7bc90664d95bf260e7a4534f17fc5b78a407aec6242685b46ea6a3453942240d

Contents?: true

Size: 402 Bytes

Versions: 7

Compression:

Stored size: 402 Bytes

Contents

class UserExportFileStateMachine
  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 |user_export_file|
    user_export_file.update_column(:executed_at, Time.zone.now)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
enju_library-0.3.11 app/models/user_export_file_state_machine.rb
enju_library-0.3.10 app/models/user_export_file_state_machine.rb
enju_library-0.3.9 app/models/user_export_file_state_machine.rb
enju_library-0.3.8 app/models/user_export_file_state_machine.rb
enju_library-0.3.8.rc.2 app/models/user_export_file_state_machine.rb
enju_library-0.3.8.rc.1 app/models/user_export_file_state_machine.rb
enju_library-0.4.0.rc.1 app/models/user_export_file_state_machine.rb