Ruby on Rails Monday, August 1, 2011

Hey Folks, Sorry for this newbie question but I am interested on how
you would do the following.

Lets say I have a User model and a User has_one Profile

On the Profile I would like to store basic data ie Gender, Date of
Birth etc.. Then I get to data like yearly income or marital status.

In the past I may have used ENUM's for marital status but would have
used yearly income as a integer for a related table ie, income_id
and then created a Income model to hold possible changing values.

With rails not supporting ENUM's (from what I can work out with
migrations) I was wondering do most of you have allot of related
tables for this sort of thing?

There will be allot of lookups on the user profile so I'm looking for
the best approach.

Hope you can advise!!

--
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