0
是否有可能訪問狀態的集合給定模型:如何訪問特定導軌模型的acts_as_state_machine狀態集合?
類談話 包括AASM
aasm_initial_state :unread
aasm_state :unread
aasm_state :read
aasm_state :closed
aasm_event :view do
transitions :to => :read, :from => [:unread]
end
aasm_event :close do
transitions :to => :closed, :from => [:read, :unread]
end
末
我希望能夠得到國家的數組一樣:
['unread', 'read', 'closed']
這可能嗎?