diff options
author | Arun Agrawal <arun@fromjaipur.com> | 2011-05-31 12:12:19 +0530 |
---|---|---|
committer | Arun Agrawal <arun@fromjaipur.com> | 2011-05-31 12:12:19 +0530 |
commit | 2e57b66931c9aa51cf41723e3ab691a550949a96 (patch) | |
tree | 895bf3b870528553fd149d526c3736c323bf3f85 | |
parent | cfb5f1b6083d4b0dabaaab70c383d223193811fd (diff) | |
download | rails-2e57b66931c9aa51cf41723e3ab691a550949a96.tar.gz rails-2e57b66931c9aa51cf41723e3ab691a550949a96.tar.bz2 rails-2e57b66931c9aa51cf41723e3ab691a550949a96.zip |
Adding comment to work with 1.8.7. Nested Attribute fix.
-rw-r--r-- | activerecord/lib/active_record/associations/collection_association.rb | 3 |
1 files changed, 3 insertions, 0 deletions
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) |