On Tue, Apr 10, 2007 at 09:59:08PM +0200, Aryk Grosz wrote:
> Hi,
> 
> I have a has_many association between Book and Page.
> 
> I have acts_as_ferret running on only the Book model. However, when I
> update the a page, it calls the auto update index on the Book model as
> well just in case any of the ferret fields were  changed.

the book index will only be updated if a book record is saved. To save a
book record without updating the ferret index, look at the
ferret_disable method aaf mixes into your book model, or into the wiki:
http://projects.jkraemer.net/acts_as_ferret/wiki/AdvancedUsage#Disablingautomaticindexing

As an alternative, If you want a completely custom handling of when aaf
does automatic index updates and when not, just override the
ferret_enabled? instance method in your book model to return true only
if you want automatic indexing and false otherwise.

Jens

-- 
Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
[EMAIL PROTECTED] | www.webit.de
 
Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to