On Oct 14, 8:34 am, Stallion <albert.anthony...@gmail.com> wrote:
> Hi,...
>
> I am having trouble with label reference in fixtures...
>
> I have two fixtures like this :
>
> ### cars.yml
> one:
> name: Ferari
> two:
> name: Volvo
>
> ### drivers.yml
> one:
> name: Stall
> car: Ferari
>
> 'Drivers' table have a 'belongs_to' clause to the 'cars' table, vice
> versa with 'has_many'
>
That should be car: one - You reference the fixture label, not any of
the data inside it.
Fred
> Evertime i am running my test, and access the 'drivers(:one).car', I
> always get nil result.
>
> Can some one tell me where my mistake?
>
> Thanks in advance,
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---