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

Correct the dynamic example to conform to initialize signature #290

Open jahan-paisley opened 10 years ago

jahan-paisley commented 10 years ago

The first parameter of initialize needs to be a class not an object instance.

jahan-paisley commented 10 years ago

I get an error message when send an instance to method (invalid < operator). It happens on unless owner_class < StateMachine::InstanceMethods at https://github.com/pluginaweek/state_machine/blob/master/lib/state_machine/machine.rb#L612 .