Hi, I could reproduce the error, but I can't explain why it happens ;-) I just committed a fix that rescues from the failure and indexes an empty string for the field in question.
It seems the errors are raised when aaf tries to index a field that isn't used by the particular model class, i.e. :title in a Comment object. Could you please try if the change fixes this for you, too ? Greetings, Jens On Thu, Apr 13, 2006 at 08:13:03PM +0200, Joerg Diekmann wrote: > Sorry - I wasn't clear enough. Comment is defined as: > > class Comment < Content > > and > > class Content < ActiveRecord::Base > > The contents table has fields like title, body, extended etc ... so the > Comment model will have them too then. The error isn't particular to the > :title field either ... if I were to have :extended as part of the > fields list, it'll through the same error but wrt extended. > > > > Kasper Weibel wrote: > > I'm not exactly sure why the error is about an undefined method for the > > class Comment, when you run rebuild_index on Content. > > > > 1) Does Comment have the fields 'title' and 'body' defined somewhere? > > 2) Didn't you mean Comment.rebuild_index? > > > > Joerg Diekmann wrote: > >> In my Content model I put acts_as_ferret :fields => [:title, :body] > >> Loading development environment. > >>>> Content.rebuild_index > >> NameError: undefined method `title' for class `Comment' > >> from > >> ./script/../config/../config/../vendor/plugins/acts_as_ferret/lib/a > >> cts_as_ferret.rb:104:in `method' > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ferret-talk mailing list > [email protected] > http://rubyforge.org/mailman/listinfo/ferret-talk -- webit! Gesellschaft für neue Medien mbH www.webit.de Dipl.-Wirtschaftsingenieur Jens Krämer [EMAIL PROTECTED] Schnorrstraße 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66 _______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

