Is it a good idea to make a profile its own model with a has_one/belongs_to association with the User model, or should the attributes of a profile just be columns in the user database?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is really a design decision that needs to be decided by how its going to be used.
I’ve recently created a program that has a ‘user’ and ‘profile’ model separated with the ‘user’ always having the a ‘profile’ constraint.
I did it this way since there is nothing in the ‘user’ table other then information needed to login a user or allow the admin to see/do certain things.
Whereas the ‘profile’ model contains data that can be viewed and searched on by other members.
But again, its a design decision you have to make based on how the data will be used.