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? -- Posted via http://www.ruby-forum.com/.
On Fri, Oct 13, 2006 at 09:41:36AM +0200, Eric Gross wrote:> 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).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 kraemer at webit.de Schnorrstra?e 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66
Anyone? -- Posted via http://www.ruby-forum.com/.
On 10/18/06, Eric Gross <tennisbum2002 at hotmail.com> 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/13/06, Jens Kraemer <kraemer at webit.de> wrote:> On Fri, Oct 13, 2006 at 09:41:36AM +0200, Eric Gross wrote: > > 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). > > 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
David, I dont see any other response on this topic except for yours, can you send me her response or repost it? David Balmain wrote:> On 10/18/06, Eric Gross <tennisbum2002 at hotmail.com> 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-- Posted via http://www.ruby-forum.com/.
On 10/18/06, Eric Gross <tennisbum2002 at hotmail.com> 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