aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2004-12-06 18:56:49 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2004-12-06 18:56:49 +0000
commit35c89c4176c12353cd772c61e1d2dc5202b4d44f (patch)
tree5826ddaf2e68c9d0b744bb06ac4002581ea634e1 /activerecord/lib
parent7cc27b7b792a5a672348a37de64b08f5ce20f203 (diff)
downloadrails-35c89c4176c12353cd772c61e1d2dc5202b4d44f.tar.gz
rails-35c89c4176c12353cd772c61e1d2dc5202b4d44f.tar.bz2
rails-35c89c4176c12353cd772c61e1d2dc5202b4d44f.zip
Fixed fixtures using primary key fields called something else than "id" #270 [dave]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@53 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-xactiverecord/lib/active_record/fixtures.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb
index df41a1e370..56dc6bf383 100755
--- a/activerecord/lib/active_record/fixtures.rb
+++ b/activerecord/lib/active_record/fixtures.rb
@@ -151,7 +151,7 @@ class Fixture #:nodoc:
end
def find
- Object.const_get(@class_name).find(self["id"])
+ Object.const_get(@class_name).find(self[Object.const_get(@class_name).primary_key])
end
private