From 2e57b66931c9aa51cf41723e3ab691a550949a96 Mon Sep 17 00:00:00 2001 From: Arun Agrawal Date: Tue, 31 May 2011 12:12:19 +0530 Subject: Adding comment to work with 1.8.7. Nested Attribute fix. --- activerecord/lib/active_record/associations/collection_association.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'activerecord/lib/active_record/associations/collection_association.rb') diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb index 17795f1b7d..c32dd77420 100644 --- a/activerecord/lib/active_record/associations/collection_association.rb +++ b/activerecord/lib/active_record/associations/collection_association.rb @@ -402,6 +402,9 @@ module ActiveRecord return memory if persisted.empty? persisted.map! do |record| + + # To work with ruby 1.8.7 + # > 1.9 #=> mem_record = memory.delete(record) mem_record_index = memory.index(record) if mem_record_index mem_record = memory.at(mem_record_index) -- cgit v1.2.3