Sweetness--thanks!

-Roy

-----Original Message-----
From: rubyonrails-talk@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
Frederick Cheung
Sent: Thursday, November 27, 2008 4:59 AM
To: Ruby on Rails: Talk
Subject: [Rails] Re: error w/dynamic fixtures




On Nov 26, 10:49 pm, "Pardee, Roy" <[EMAIL PROTECTED]> wrote:
> Hey All,

> Can someone tell me what I'm doing wrong here?  Is the problem that 
> projects.yml is getting read in before statuses.yml?  If so, how do I control 
> that load order?

That is correct and the statuses method probably isn't even defined in the 
context you are using this in. The write way to do this is to put

status: active

in that fixture. As long as you have the status belongs_to association, rails 
will figure out that this means that you want the status_id column to have the 
value of the id of the status fixture with label 'active'. This won't work if 
your fixture for statuses explicitly sets an id.

Fred



--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to