diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2012-05-09 19:35:34 -0700 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2012-05-16 17:22:44 -0700 |
commit | e2a070cf47fb9a845ecf53ff2f437390598fe0b7 (patch) | |
tree | 584b82c8f513676baa6cc134234eb1cfb4fd431d /activerecord/lib | |
parent | 1f0e2de8670587a75453f064cf384c2382c88526 (diff) | |
download | rails-e2a070cf47fb9a845ecf53ff2f437390598fe0b7.tar.gz rails-e2a070cf47fb9a845ecf53ff2f437390598fe0b7.tar.bz2 rails-e2a070cf47fb9a845ecf53ff2f437390598fe0b7.zip |
Fix CollectionAssociation#replace to return new target (closes #6231)
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/associations/collection_association.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb index 00321ec860..56ec4c5c23 100644 --- a/activerecord/lib/active_record/associations/collection_association.rb +++ b/activerecord/lib/active_record/associations/collection_association.rb @@ -468,6 +468,8 @@ module ActiveRecord raise RecordNotSaved, "Failed to replace #{reflection.name} because one or more of the " \ "new records could not be saved." end + + new_target end def concat_records(records) |