mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
16 lines
301 B
Ruby
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
|