Optimizing find with :include on a has_many :though relation (bug or feature?)

Hello all

I was hoping somebody could help me with this optimizing problem:
I have pasted the problem here: http://pastie.caboo.se/27946 so it is
more readable

I would like to know if this is expected behavior in rails or if I'm
doing something wrong.
I'm running on EdgeRails.

/MartOn

Have you tried:

:include => {:assignments => :employment}

when loading your Assets instead? You're using the relation of the
relation and this will tell rails to load it
I didn't try it on your example as I don't have any has_many :through
relations in my DB schema but I use this on
my other relations all the time. Hope it helps.

-Michael
http://javathehutt.blogspot.com