Forum: Ruby on Rails has_and_belongs_to_many -- how to create test fixtures?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2837408ba0375c40b235f0a5a5107d37?d=identicon&s=25 doug (Guest)
on 2006-03-09 10:39
Hallo -- can anyone offer me any pointers as to I should handle
many-to-many relationships in Rails tests?
Cheers,
   doug.
337cdd270761e0e6f4356de45b04d388?d=identicon&s=25 Jonathan Viney (jonny)
on 2006-03-09 12:59
Just name the fixture file after the join table, eg people_notes.yml if
you are using has_and_belongs_to_many between the people and notes
table.

-Jonny

doug wrote:
> Hallo -- can anyone offer me any pointers as to I should handle
> many-to-many relationships in Rails tests?
> Cheers,
>    doug.
2837408ba0375c40b235f0a5a5107d37?d=identicon&s=25 Doug Livesey (biot023)
on 2006-03-09 13:01
Jonathan Viney wrote:
> Just name the fixture file after the join table, eg people_notes.yml if
> you are using has_and_belongs_to_many between the people and notes
> table.
>
> -Jonny
>
> doug wrote:
>> Hallo -- can anyone offer me any pointers as to I should handle
>> many-to-many relationships in Rails tests?
>> Cheers,
>>    doug.

Thanks very much, man!
This topic is locked and can not be replied to.