On Wed, May 23, 2007 at 10:07:29PM +0200, Patrick Aljord wrote:
> Hey all,
> 
> I'm using acts_as_ferret this way:
> class Job < ActiveRecord::Base
> acts_as_ferret :fields => [:title, :workers_name]
> 
> def workers_name
> return self.workers.inject("") {|names,b| names + " " +  b.first_name}.to_s
> end
> end
> 
> But when I do Job.find_by_contents("workers_name:patrick")
> I get nil.
> 
> Yet when I do:
> j=Job.find :first
> j.workers_name
> I do get a worker (among others) which name is patrick.
> 
> Any idea why I don't get it with find_by_contents?

have you tried rebuilding your index? You have to do so after changing
aaf options.

Jens

-- 
Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
[EMAIL PROTECTED] | www.webit.de
 
Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to