mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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
This commit is contained in:
parent
7cc27b7b79
commit
35c89c4176
2 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
|||
*CVS*
|
||||
|
||||
* Fixed fixtures using primary key fields called something else than "id" [dave]
|
||||
|
||||
* Added proper handling of time fields that are turned into Time objects with the dummy date of 2000/1/1 [HariSeldon]
|
||||
|
||||
* Added reverse order of deleting fixtures, so referential keys can be maintained #247 [Tim Bates]
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue