search for: d6ghux3ao8oj

Displaying 1 result from an estimated 1 matches for "d6ghux3ao8oj".

2012 Jul 28
1
`build_association` produces DB-queries
Let `User.has_one :profile`. I''ve always thought that `@user.build_profile` is a cheap thing to do - it''s just creating a new object without persisting it. But, in fact, it does 2 queries to the DB: `BEGIN` and `COMMIT`. In my app I have an admin users#index page where users'' details can be edited, and to simplify the code I build a profile whenever it''s