I'm using the Workflow gem (https://github.com/geekq/workflow) in my Rails App as a state machine. As an object passes through various states, I'd like to record the datetime when it changes, but not too sure if that's so straightforward.
One approach I may take is one extra column called 'workflow_state_date_changed', and update this column whenever the state changes - this was I could see how long the object has been in a particular state. What it won't allow, however, is to historically look at all the states it past through, and the time spent in each. Any thoughts of a way of achieving this in a fairly light way?
Look forward to hearing from you.