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.
doug (Guest)
on 2006-03-09 11:39
Hallo -- can anyone offer me any pointers as to I should handle
many-to-many relationships in Rails tests?
Cheers,
   doug.
Jonathan V. (Guest)
on 2006-03-09 13: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.
Doug L. (Guest)
on 2006-03-09 14:01
Jonathan V. 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.