Reputation: 10360
In our rails
app, some model
may require approval process
. For example, for purchasing order (PO)
, usually it starts with a submission of the PO
, then manager approves and CEO approves before the PO
can be sent out to suppliers. The approval procedure is likely predefined. Along with the approval process
, we would also like to record data for every transition:
1. who did it (use id),
2. when she/he did it (time stamp)
3. comment by approval person (usually text).
4. approval process can be attached to the model late on demand.
There are quite a few state machine
ruby gem
out there (such as state machine
). Our question is that: is the state machine enough to fulfill the requirement laid out above?
Upvotes: 0
Views: 590