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']
这可能吗?