Hello,

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.

Something like:

*- User*
-- "name"
-- "gender", ...
-- "status_id" (this must refers to UserStatus)

*- UserStatus*
-- "name" (like active, fired, etc)


*- Project*
-- "name", ..
-- "status_id" (this must refers to ProjectStatus)

*- 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.
Something like:
/app/views/projects/new.html.erb
/app/views/projects/status/new.html.erb


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?

Thanks,
--
Fernando Brito

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to