I have a rails model called Creative
that implements a workflow using the aasm
gem. Currently my model has just one workflow implemented in it.
I have a business scenario that will require me to implement another workflow in the same model which which will be activated if a boolean value on the model is true
.
I see 2 approaches that could be viable options
- Create a new model that uses the same table name as
Creative
and implement the workflow there - Implement the workflow in the same model using a separate column to store the states for the second workflow and use its method depending on my boolean value
What would be a good design that could be implemented here?
I understand this is a very open ended question and would love to get suggestions if anyone has come across such a scenario