search for: has_and_bleongs_to_many

Displaying 1 result from an estimated 1 matches for "has_and_bleongs_to_many".

2006 Jan 12
2
Finding by association
I have two objects that are associated in the following way: class Class1 < ApplicationController has_and_belongs_to_many :class2s has_and_belongs_to_many :otherClasses end class Class2 < ApplicationController has_and_belongs_to_many :class1s has_and_bleongs_to_many :otherClasses end Now, when I run the following query, @objects = Class1.find(:all, :conditions => ["class2s.id = ?", params[:id]], :include => :class2s) I expect to get a collection of Class1 objects wihere each Class1 object would have a fully loaded collection of Class2...