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/api.rb
2013-04-24 12:57:06 +02:00

43 lines
628 B
Ruby

class DefaultState
include AASM
aasm do
state :alpha, :initial => true
state :beta
state :gamma
end
end
class ProvidedState
include AASM
aasm do
state :alpha, :initial => true
state :beta
state :gamma
end
def aasm_read_state
:beta
end
end
class PersistedState < ActiveRecord::Base
include AASM
aasm do
state :alpha, :initial => true
state :beta
state :gamma
end
end
class ProvidedAndPersistedState < ActiveRecord::Base
include AASM
aasm do
state :alpha, :initial => true
state :beta
state :gamma
end
def aasm_read_state
:gamma
end
end