rails/rails — pull request #8912 by senny (2013-01-12 14:24:49+00:00)
Title: `CollectionAssociation#empty?` respects newly builded records

This is a fix for #8879

My solution is quite hacky, I did not want to mess with the `loading` internals of the association though. I wrote up a test-case to lock the behavior. If someone with more insight about the internals good a better fix, I'm happy to adjust.