state-machines / state_machines

Adds support for creating state machines for attributes on any Ruby class
https://github.com/state-machines/state_machines
MIT License
814 stars 91 forks source link

Better readme on static / dynamic definitons chapter #52

Open ristovskiv opened 7 years ago

ristovskiv commented 7 years ago

The code that was posted before changed the value of the state method in the Vehicle class to the initial one, no matter if it already has one or not.

evsyukovmv commented 7 years ago

Was useful to fix the problem with activerecord and dynamic state machine class (dynamic state machine class overrides activerecord object state to initial on each initialization).