Doubt in Ferret Search on multiple models

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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs