as staed in the API, I am loading fixtures into a table :

rake db:fixtures:load  FIXTURES=ecourses without specifying the id in
a simple has_many/belongs_to association, and I get an 'unknow
column'  error for the foreign_key...
if I change the FK to a label interpolation, then I got it running
well....

I am using the following tset code
:
Models--------------
class Epath < ActiveRecord::Base
   has_many :ecourses
end

class Ecourse < ActiveRecord::Base
   belongs_to :epath
end

Fixtures---------------
# epaths
complexPath:
  name: Complex One

# ecourses.yml
curabitur:
  name: Curabitur
  epath: complexPath

error : Mysql::Error: Unknown column 'epath' in 'field list' : INSERT
INTO `ecourses` (`epath`,......

BUT if I modify the Fixtures

# ecourses.yml
curabitur:
  name: Curabitur
  epath_id:  <%= Fixtures.identify(:complexPath) %>

then I got it done ....

what's wrong in my code ?

tfyh

erwin




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to