Multi_search error undefined method

Hi,

Im having problems using the multi_search command. I keep getting the
following error.

“undefined method `<<’ for Book:Class”

here is the code associated with this.

class Book < ActiveRecord::Base
acts_as_ferret :store_class_name => true
end

class User < ActiveRecord::Base
acts_as_ferret :store_class_name => true
end

and the call is the following

t=User.multi_search(@query,Book).

I tried deleting my browser session and rebuilding the index (by
deleting it).

Im still getting the same error. Any ideas?

Anyone?

On 10/18/06, Eric G. [email protected] wrote:

Anyone?

Jens already replied to this (see below). I have no idea why it didn’t
make it onto rubyforum. Try joining the mailing list.

Cheers,
Dave

David, I dont see any other response on this topic except for yours, can
you send me her response or repost it?

David B. wrote:

On 10/18/06, Eric G. [email protected] wrote:

Anyone?

Jens already replied to this (see below). I have no idea why it didn’t
make it onto rubyforum. Try joining the mailing list.

Cheers,
Dave

On 10/18/06, Eric G. [email protected] wrote:

David, I dont see any other response on this topic except for yours, can
you send me her response or repost it?

I forwarded you his reply in my previous email but it seems to have
been stripped. I’d better let Andreas know about that. Anyway, you can
see the full thread here:

http://thread.gmane.org/gmane.comp.lang.ruby.ferret.general/1443/focus=1445

Cheers,
Dave

On Fri, Oct 13, 2006 at 09:41:36AM +0200, Eric G. wrote:

acts_as_ferret :store_class_name => true
end

class User < ActiveRecord::Base
acts_as_ferret :store_class_name => true
end

and the call is the following

t=User.multi_search(@query,Book).

try this:

t = User.multi_search(@query, [ Book ])

I just committed a fix so that

t=User.multi_search(@query,Book)
will work, too.

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