Having one to many connection (for example post has many comments), what
is the most efficient way of saving all comments when post is saved.
Using after_save on Post would introduce the n+1 problem. Is there any
way of saving the whole structure at once?
class Post
has_one :author, :autosave => true
end
The autosave will take care of saving associations when the parent is
saved.
On May 28, 2:19 pm, Milan D. [email protected]