Displaying 1 result from an estimated 1 matches for "workers_name".
Did you mean:
worker_name
2007 May 23
2
issues with searching custom fields
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...