From 3a0f4d30cf6cbe921ffa2a78e5a0192c32a86ef4 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 8 May 2009 17:56:12 +0000 Subject: [PATCH] Patch composite_primary_keys to work around issue when one component of a composite key is called "id". --- .../lib/composite_primary_keys/association_preload.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/gems/composite_primary_keys-2.2.2/lib/composite_primary_keys/association_preload.rb b/vendor/gems/composite_primary_keys-2.2.2/lib/composite_primary_keys/association_preload.rb index 00b343c4e..56b2b9c73 100644 --- a/vendor/gems/composite_primary_keys-2.2.2/lib/composite_primary_keys/association_preload.rb +++ b/vendor/gems/composite_primary_keys-2.2.2/lib/composite_primary_keys/association_preload.rb @@ -114,7 +114,7 @@ module CompositePrimaryKeys id_map = {} records.each do |record| - key = primary_key_name.map{|k| record.send(k)} + key = primary_key_name.map{|k| record.attributes[k]} key_as_string = key.join(CompositePrimaryKeys::ID_SEP) if key_as_string -- 2.39.5