Hi Steve,
The field is updated when .state_fu is referenced - i.e., the state machine is instantiated when someone asks for it. This is done before creation via 'before_create :state_fu!', which instantiates all of an object's state machines, to ensure a default value is saved to the database (in the case of ActiveRecord models).
I chose not to initialize it until it is needed for performance reasons.
Does that answer your question?
cheers,
David Lee.
--
cheers,
David Lee