pluginaweek / state_machine

Adds support for creating state machines for attributes on any Ruby class
http://www.pluginaweek.org
MIT License
3.74k stars 505 forks source link

State already defined #360

Open bidva opened 5 years ago

bidva commented 5 years ago

I have a model which contains 3 different state columns (state, background_check_status,permit_status) background_check_status,permit_status has defined the same states (Submitted, Rejected, Accepted, Pending) now on running my tests I get this warning

State "Submitted" for :chauffeur_permit_status is already defined in :background_check_status
State "Rejected" for :chauffeur_permit_status is already defined in :background_check_status
State "Accepted" for :chauffeur_permit_status is already defined in :background_check_status
State "Pending" for :chauffeur_permit_status is already defined in :background_check_status

how can I turn this off?

bidva commented 5 years ago

Sorry to bug @obrie, Do you have any Idea about this warning message?

rocket-turtle commented 5 years ago

Have you defined a namespace on your permit_status state_machine?

bidva commented 5 years ago

@rocket-turtle no, I didn't. Basically, in my model, I have a couple of fields have stated and all are in the same class model.