I've been trying to update my Rails project to the new "foxy fixtures"
approach but have run into the following (vexing) problem.

My models looks like this:

class Account < ActiveRecord::Base
  has_one     :administrator, :class_name => "User"
end

class User < ActiveRecord::Base
  belongs_to :account
end


When I do this in the fixtures:

accounts.yml...

valid_account:
  administrator: valid_user


users.yml...

valid_user:
  account: valid_account


I get the following:

ActiveRecord::StatementInvalid: Mysql::Error: Unknown column
'administrator' in 'field list': INSERT INTO `accounts` (...

Is there a way to tell the fixture that "administrator" should
reference the User model?

--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to