Displaying 1 result from an estimated 1 matches for "has_and_belongs_to_many_different".
2006 Aug 12
1
has and belongs to many different?
...r 23
person1, books, 30
person2, books, 19
person2, books, 31 #Person 2 owns book 31
... and so on..
3. A number of tables for different ''things''...
books - table for books
chairs - table for chairs
and so on...
Ideally I want to have something which means "person
has_and_belongs_to_many_different things"
I guess it could be implemented by manually looking at the 2nd table to
find the foreign key and table that it refers to and then do a find from
the specific table for the specific ID. But, I''m trying to find a
better "Railsy" way.
Cheers
Mohit.