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/namespaced.rb
2021-03-25 14:06:04 +05:30

16 lines
301 B
Ruby

class MultipleNamespaced < ActiveRecord::Base
include AASM
aasm(:status, namespace: :car) do
state :unsold, initial: true
state :sold
event :sell do
transitions from: :unsold, to: :sold
end
event :return do
transitions from: :sold, to: :unsold
end
end
end