pluginaweek / state_machine

Adds support for creating state machines for attributes on any Ruby class
http://www.pluginaweek.org
MIT License
3.74k stars 507 forks source link

Cannot run events in parallel: set_non_paying #271

Open akatz opened 11 years ago

akatz commented 11 years ago

It seems that if the conditional requirement for a state transition is false, the error message for fire_events! is misleading.

pry(main)> acc.fire_events!(:set_non_paying) StateMachine::InvalidParallelTransition: Cannot run events in parallel: set_non_paying

pry(main)> z.set_non_paying! StateMachine::InvalidTransition: Cannot transition status via :set_non_paying from :trial (Reason(s): Status cannot transition via "set non paying")