Displaying 1 result from an estimated 1 matches for "my_a".
Did you mean:
m_a
2006 Apr 10
3
preloading child rows just a level deeper...
hiho.
following problem.
i have 3 tables in my database with each representing an object.
lets say
A belongs_to B belongs_to C.
when i do
my_a = A.find(:all)
i can access B as my_a.b and C as my_a.b.c
thats fine but rails querys the database each time i do that
so is use
my_a = A.find(:all, :include => :b)
works fine for my_a.b but not for my_a.b.c
so i tried
my_a = A.find(:all, :include => [:b, :c])
but that gives an error:
"...