如何从模型类中获取所有state_machine事件?

ton*_*all 3 ruby-on-rails state-machine

是否可以从模型类中获取所有事件?我想按事件过滤列表.

关于所有过渡,在邮件列表上有一个类似的问题.

我正在使用https://github.com/pluginaweek/state_machine

Pav*_*ing 6

在链接到它的github页面上,它显示了以下API方法:

vehicle.state_events  # shows all the events possible from the current state
Run Code Online (Sandbox Code Playgroud)

vehicle.state_paths.events # shows all the events for an object
Run Code Online (Sandbox Code Playgroud)