piotrmurach / finite_machine

A minimal finite state machine with a straightforward syntax.
https://piotrmurach.github.io/finite_machine/
MIT License
808 stars 38 forks source link

ActiveRecord example - reflects machine state, even when event cancelled #33

Closed dmgr closed 9 years ago

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.21%) to 97.59% when pulling dd6f5024dd1181f57889856363c02fda184714ec on dmgr:master into bc254de558939f79c0e5aa0944fdb99776627463 on peter-murach:master.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.21%) to 97.59% when pulling dd6f5024dd1181f57889856363c02fda184714ec on dmgr:master into bc254de558939f79c0e5aa0944fdb99776627463 on peter-murach:master.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.21%) to 97.59% when pulling dd6f5024dd1181f57889856363c02fda184714ec on dmgr:master into bc254de558939f79c0e5aa0944fdb99776627463 on peter-murach:master.

piotrmurach commented 9 years ago

I would refrain from calling machine directly as this is implementation detail and leaky abstraction at best. I would imagine it's possible to just call state which will be forwarded to machine anyway but doesn't depend on it. Could you try that?

dmgr commented 9 years ago

Hi Peter, yes, using just state instead of machine.state works fine.