I want to store a state in the model, and one can change from one state to any other state. The list of states are predefined in the model.
A state-machine it too much for me, because I don’t need events/transitions between states, and don’t want to write N-squared transitions (to allow any state to transfer to any other state).
Is there a good Rails gem for doing this? I want to avoid writing all the constants/accessors/checking validity myself.
I found that the correct keyword to search for should be ‘Active Record Enumeration’
I choose the second one called enumerize. It provide nice API and good form input generator. It also have a simple scope and accessors.