I'm currently using the aasm gem and it works great. Is it possible to define state
just once instead of twice like below?
enum state: [:pending, :active, :inactive]
aasm column: :state, enum: true do
state :pending, :active, :inactive
event :accept do
transitions from: :pending, to: :active
end
event :pause do
transitions from: :active, to: :inactive
end
event :resume do
transitions from: :inactive, to: :active
end
end