Commit 3ba40f31a5e0f73fe7b2a5c299ca89683fded7bf

Authored by Rafael Martins
1 parent f64d2da7

Fix: profile search problem with filters

app/controllers/public/profile_search_controller.rb
... ... @@ -11,7 +11,7 @@ class ProfileSearchController < PublicController
11 11 if params[:where] == 'environment'
12 12 redirect_to :controller => 'search', :query => @q
13 13 else
14   - @results = Article.find_by_contents(@q + " profile_id:#{profile.id} published:true")[:results].paginate(:per_page => 10, :page => params[:page])
  14 + @results = Article.find_by_contents(@q, {}, {:filter_queries => ["profile_id:#{profile.id}", 'published:true']})[:results].paginate(:per_page => 10, :page => params[:page])
15 15 end
16 16 end
17 17 end
... ...