# Issues with searching custom fields with acts\_as\_ferret

**URL:** <https://www.ruby-forum.com/t/issues-with-searching-custom-fields-with-acts-as-ferret/132491>\
**Category:** Rails\
**Created:** [May 23, 2007, 10:42pm UTC](https://www.ruby-forum.com/t/issues-with-searching-custom-fields-with-acts-as-ferret/132491 "2007-05-23T22:42:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![patcito](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/50afbb/32.png) [@patcito](https://www.ruby-forum.com/u/patcito)\
**Post date:** [May 23, 2007, 10:42pm UTC](https://www.ruby-forum.com/t/issues-with-searching-custom-fields-with-acts-as-ferret/132491/1 "2007-05-23T22:42:21Z")

</div>

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?

thanx in advance

Pat
