Topic: User Profile design questions

I have some questions on designing a profile system, and would like to hear what you think is the best approach.

This is what i want :
A user will have a profile, the profile will then contain lots of select boxes with pre def values, one example is
Country. So what is the best way to store this to the profile => Should i go for has_one :contry and store the country ID or should i go for storing the Country Name as a string in Profile ?

Re: User Profile design questions

I would go for a user has_one profile relationship with the profile model providing the lookup lists for the predefined values, obviously the profile would have a field for the country etc...

You could use lookup tables rather than a hard coded array for your definitions in which case you would have a profile that belongs_to a country and a country has_many profiles but the user to profile would still be a one to one relationship in which the country field would become a country_id

I guess it depends on whether you wish to allow site admins to update the contents of the lookup values

What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)