diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-06 18:56:49 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-06 18:56:49 +0000 |
commit | 35c89c4176c12353cd772c61e1d2dc5202b4d44f (patch) | |
tree | 5826ddaf2e68c9d0b744bb06ac4002581ea634e1 /activerecord/lib | |
parent | 7cc27b7b792a5a672348a37de64b08f5ce20f203 (diff) | |
download | rails-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-x | activerecord/lib/active_record/fixtures.rb | 2 |
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 |