# Doubt in Ferret Search on multiple models

**URL:** <https://www.ruby-forum.com/t/doubt-in-ferret-search-on-multiple-models/145574>\
**Category:** Rails\
**Created:** [August 11, 2008, 6:01pm UTC](https://www.ruby-forum.com/t/doubt-in-ferret-search-on-multiple-models/145574 "2008-08-11T18:01:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rocknrollcar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f14d63/32.png) [@rocknrollcar](https://www.ruby-forum.com/u/rocknrollcar)\
**Post date:** [August 11, 2008, 6:01pm UTC](https://www.ruby-forum.com/t/doubt-in-ferret-search-on-multiple-models/145574/1 "2008-08-11T18:01:06Z")

</div>

Hi. I use the following code in my “search” controller, “index” action  
in my project. It has multiple models like Project, Task, Note,etc. I  
use ferret for full text search. I use act\_as\_authenticated plugin for  
login/logout.

```
@results = ActsAsFerret::find(params[:query], [Project, Task,

```

Note],:conditions =\> [“user\_id = ?”, current\_user.id])  
respond\_to do |format|  
#format.html # search.html.erb  
format.xml { render :xml =\> @results }  
end

The search action should search for the text of the models of a  
particular user only which is current\_user. When i perform the text  
search, the records of other users are also displayed in the results.  
Someone please help. Thank you.
