Sorry if this looks silly, but I trying to learn Ruby on Rails best practices.
I have a model called “Users” and a model called “Projects”. Now I need to implement a “status” field to each one of them. Each User/Project belongs_to a status.
But because they have different kind of status possibilities, I will need 2 new models: UserStatus and ProjectStatus.
– “gender”, …
– “status_id” (this must refers to UserStatus)
– “name” (like active, fired, etc)
– “name”, …
– “status_id” (this must refers to ProjectStatus)
– “name” (opened, completed, pending, etc)
Also, to keep my application cleaner, I would like to have the ProjectStatus viewers inside my Project viewer folder.
Is there any convention of doing this? Is that the correct way of doing what I want? What should I search for? Can “namespaces” help me? Am I picking good model names?