On Wed, Oct 11, 2006 at 01:11:32AM +0200, Evan wrote:
> I have a model that allows subclasses to dynamically define fields.
> 
> The following code is a short test case that illustrates the problem I'm 
> having:
> 
> class Product < ActiveRecord::Base
>   acts_as_ferret :fields => [:name]

Don't call acts_as_ferret in your base class, instead add the :name
field to the acts_as_ferret calls in Music and Book. That should fix
your problems. 

acts_as_ferret isn't supposed to be called twice in a model (which
is the case if you call it in your superclass, and in classes inheriting
from that). 


cheers,
Jens


-- 
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

Reply via email to