Jens Kraemer wrote:
> Hi!
>
> On Mon, Oct 09, 2006 at 10:35:00AM +0200, wc wrote:
>> Hello, I am trying to use the multi_search method, but I keep getting
>> type error on nil objects, I send it [Model1,Model2] and it seems as
>> though the class names keep getting clobbered and turn to nil, somewhere
>> along the multi_index area. I tried to trace what was going on, but I
>> got nothing, also, this only happens when there are actually hits(thank
>> god, most of the time). Perhaps some insight? Thank you!
>
> a stack trace and / or some code would help in tracking this down...
>
> 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
Here is the trace
User.multi_search("foo",[Model1,Model2])
TypeError: nil is not a symbol
from
./script/../config/../config/../vendor/plugins/acts_as_ferret/lib/class_methods.rb:412:in
`const_get'
from
./script/../config/../config/../vendor/plugins/acts_as_ferret/lib/class_methods.rb:412:in
`multi_search'
from
./script/../config/../config/../vendor/plugins/acts_as_ferret/lib/class_methods.rb:431:in
`id_multi_search'
from
./script/../config/../config/../vendor/plugins/acts_as_ferret/lib/multi_index.rb:27:in
`search_each'
from
./script/../config/../config/../vendor/plugins/acts_as_ferret/lib/class_methods.rb:428:in
`id_multi_search'
from
./script/../config/../config/../vendor/plugins/acts_as_ferret/lib/class_methods.rb:411:in
`multi_search'
from (irb):1
both my models call:
acts_as_ferret :store_class_name => true
and that is basically it, find_by_contents works great, just not
multi_search
Hope this helps
~wil
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk