Ruby on Rails Thursday, July 29, 2010

Appreciate this is a path well travelled probably.

What's the best way of to deal with gender.

i.e. a Person is either Male or Female (generally and fot my purposes
I'll stick with that rule).

So is it best to go Person with an attribute gender, or, I guess it's
best to do something like this - the rails way?

Person
belongs_to: gender

Gender
has_many: people


Sorry if this is such an obvious question just want to do it right.
--
Posted via http://www.ruby-forum.com/.

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment