On 12 January 2011 10:30, Michael Pavling <[email protected]> wrote:
> On 12 January 2011 10:14, Colin Law <[email protected]> wrote:
>> Or just put the profile data in the user table of course.
>
> yebbut... encapsulation *is* a "good thing"... and you wouldn't want
> to encourage the OP to denormalise for the sake of it. It is nice to
> have classes responsible for their own stuff. I like to keep the User
> model of my own for just authentication/essential info, and delegate
> addresses, telephones, hobbies, etc, to their own classes... horses
> for courses :-)

I agree about the encapsulation, it all depends on rest of the app
which way to go.  However I don't think your use of the word
denormalise is correct.  The db would not be denormalised by moving
stuff into the user table.  There would be no replication of data as
it is a has_one relationship.  It would not be appropriate for things
such as hobbies which would likely be a habtm relationship.

Colin

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