[Rails] Re: Correct way to build an AR object with multiple associations?

2008-12-18 Thread Lisa Klein
Oooh, that clarified a few things. Thanks Andrew! On Dec 18, 4:58 am, Andrew Porter wrote: > Lisa Klein wrote: > > book.user_id = @user.id > > > Is this the way it's supposed to be done?  I know that it's preferred > > to interact with dependent resources through their associations. So > > addi

[Rails] Re: Correct way to build an AR object with multiple associations?

2008-12-18 Thread Andrew Porter
Lisa Klein wrote: > book.user_id = @user.id > > Is this the way it's supposed to be done? I know that it's preferred > to interact with dependent resources through their associations. So > adding the user_id manually seems a bit clunky to me. But I'm not > Do book.user = @user instead then