是否可以访问给定模型的状态集合:
课堂对话包括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']
这可能吗?