[Rails] Re: Finding by association

Jason Fox
2006-01-12T14:52:02Z

What I''m trying to do is find all Class1 objects that have an
association to Class2 objects.  However, I also want to make sure that
the Class1 objects that are returned by the find() method have fully
populated Class2 collections, i.e., I want it to depend on lazy loading
to get me my Class2 collection in my Class1 objects.

M Daggett wrote:
> Hi Jason,
> I could be totally missing your point but I think that rails provides
> you the ability to do this
> @o = myClass1.class2s
>
> @o will now contain an array of all the class2 objects collected in
> that instance of myClass1
>
>
> Mark
>
> On 1/11/06, Jason Fox <jfoxny@gmail.com> wrote:
>>   end
>> collection (the Class2 object with the id that I specified in the
>> Rails mailing list
>> Rails@lists.rubyonrails.org
>> http://lists.rubyonrails.org/mailman/listinfo/rails
>>
>
>
> --


--
Posted via http://www.ruby-forum.com/.