rails/rails — pull request #6237 by drogus (2012-05-10 02:40:55+00:00)
Title: Fix CollectionAssociation#replace to return new target (closes #6231)

I would like to get some feedback before pushing it. Is it safe to return `new_target` from `replace`? I think that it should be fine as this becomes new target anyway, but maybe I'm missing something.

Another way would be to return new collection object, but target seems better as that's what you also get in `replace` in ruby.

/cc @tenderlove @jonleighton