Sha256: 0b53674509e75bbae2db924ff77cdb6a1b10453c1037c8cb8918d871ce426592
Contents?: true
Size: 519 Bytes
Versions: 46
Compression:
Stored size: 519 Bytes
Contents
class UserReserveStatStateMachine 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 |user_reserve_stat| user_reserve_stat.update_column(:started_at, Time.zone.now) user_reserve_stat.calculate_count! end after_transition(to: :completed) do |user_reserve_stat| user_reserve_stat.update_column(:completed_at, Time.zone.now) end end
Version data entries
46 entries across 46 versions & 1 rubygems