1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00
aasm/spec/models/active_record/timestamp_example.rb
2021-03-08 09:55:14 +05:30

16 lines
271 B
Ruby

class TimestampExample < ActiveRecord::Base
include AASM
aasm column: :aasm_state, timestamps: true do
state :opened
state :closed
event :open do
transitions to: :opened
end
event :close do
transitions to: :closed
end
end
end