Problem with composite primary keys, fixtures

Hi,

Rails 2.3.4 Composite Primary Keys 2.3.2

I'm having trouble loading fixture data for models with composite primary keys.

NoMethodError: You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.first     vendor/gems/composite_primary_keys-2.3.2/lib/ composite_primary_keys/base.rb:261:in `find_from_ids' test/unit/site_location_test.rb:10:in `setup'

# site_location.yml

zzustest-sch01:   schoolid: ZZUSTEST   siteid: SCH-01   latitude: 29.4266   longitude: -98.54788   elevation: 224.3   datasource: 1   uttimestamp: <%= Date.new(2009, 6, 18) %>   enteredelevation: 198

# line 10 of the setup method @record = site_location('zzustest-sch01')

Has anyone else seen this?

Regards,

Dan

Quoting Daniel Berger <djberg96@gmail.com>:

Hi,

Rails 2.3.4 Composite Primary Keys 2.3.2

I'm having trouble loading fixture data for models with composite primary keys.

NoMethodError: You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.first     vendor/gems/composite_primary_keys-2.3.2/lib/ composite_primary_keys/base.rb:261:in `find_from_ids' test/unit/site_location_test.rb:10:in `setup'

# site_location.yml

zzustest-sch01:   schoolid: ZZUSTEST   siteid: SCH-01   latitude: 29.4266   longitude: -98.54788   elevation: 224.3   datasource: 1   uttimestamp: <%= Date.new(2009, 6, 18) %>   enteredelevation: 198

# line 10 of the setup method @record = site_location('zzustest-sch01')

Try: @record = site_location(:zzustest-sch01)

symbol, not string

HTH,   Jeffrey

I don't think it matters, but I tried it just in case. Same error.

Regards

Dan