I started using robotcoop’s CachedModel class in my project but have
encountered problems when using it with the acts_as_ferret plugin. It
seems it doesn’t index everything in my STI model, also if I do a search
from my base STI class I get a result count but no results. If I run the
same search from one of the children STI models I get the appropriate
results (if the information was indexed).
I solved this problem finally. After investigating Ferret,
Acts_As_Ferret
and CachedModel I finally turned to checking out Rails. It turns out
Rails
1.1.6 does not properly scope queries for STI models if they have an
abstract_class.
The problem was that Rails current method did not check to see if the
class’
parent was abstract.
Hope this helps someone else who may try to use STI and CachedModel
together. Now that it works I’m very pleased with the solution. Almost
split
my data into separate tables.
Sorry for the noise,
Curtis
----- Original Message -----
From: [email protected]
To: [email protected]; [email protected]
Sent: Thursday, November 16, 2006 11:45 AM
Subject: [Libraries] Strange indexing issues with CachedModel, STI, and
AAF
I started using robotcoop’s CachedModel class in my project but have
encountered problems when using it with the acts_as_ferret plugin. It
seems
it doesn’t index everything in my STI model, also if I do a search from
my
base STI class I get a result count but no results. If I run the same
search
from one of the children STI models I get the appropriate results (if
the
information was indexed).
:role => {},
end