Please sign in to comment.
Update documentation for collection<< to reflect << on new records.
collection<< does not automatically fire update sql unless the parent object is not a new record (and thus has a primary key). eg: p = Post.new p.comments << Comment.new does not call update sql until: p.save at which point it saves the parent object and then the collection object. changes that to the
- Loading branch information...
Showing with 2 additions and 2 deletions.