Sha256: 89c2416b0d1b9d3e65b36fbb623ac00c267348903811b65fe10c498f0313d03c

Contents?: true

Size: 580 Bytes

Versions: 12

Compression:

Stored size: 580 Bytes

Contents

class ManifestationCheckoutStatStateMachine
  include Statesman::Machine
  state :pending, initial: true
  state :started
  state :completed

  transition from: :pending, to: :started
  transition from: :started, to: :completed

  after_transition(to: :started) do |manifestation_checkout_stat|
    manifestation_checkout_stat.update_column(:started_at, Time.zone.now)
    #manifestation_checkout_stat.calculate_count!
  end

  after_transition(to: :completed) do |manifestation_checkout_stat|
    manifestation_checkout_stat.update_column(:completed_at, Time.zone.now)
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
enju_circulation-0.1.2 app/models/manifestation_checkout_stat_state_machine.rb
enju_circulation-0.1.1 app/models/manifestation_checkout_stat_state_machine.rb
enju_circulation-0.1.0 app/models/manifestation_checkout_stat_state_machine.rb
enju_circulation-0.1.0.pre49 app/models/manifestation_checkout_stat_state_machine.rb
enju_circulation-0.1.0.pre48 app/models/manifestation_checkout_stat_state_machine.rb
enju_circulation-0.1.0.pre47 app/models/manifestation_checkout_stat_state_machine.rb
enju_circulation-0.1.0.pre46 app/models/manifestation_checkout_stat_state_machine.rb
enju_circulation-0.1.0.pre45 app/models/manifestation_checkout_stat_state_machine.rb
enju_circulation-0.1.0.pre44 app/models/manifestation_checkout_stat_state_machine.rb
enju_circulation-0.1.0.pre43 app/models/manifestation_checkout_stat_state_machine.rb
enju_circulation-0.1.0.pre42 app/models/manifestation_checkout_stat_state_machine.rb
enju_circulation-0.1.0.pre41 app/models/manifestation_checkout_stat_state_machine.rb