From 0bbf8a132da9ca5d9a1b049b34f24bda3e1e18f1 Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Mon, 28 Jul 2014 12:59:52 -0300 Subject: [PATCH] Adapt find_by_contents call after search-suggestions feature --- app/controllers/my_profile/cms_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/my_profile/cms_controller.rb b/app/controllers/my_profile/cms_controller.rb index ca24b44..32f6ed1 100644 --- a/app/controllers/my_profile/cms_controller.rb +++ b/app/controllers/my_profile/cms_controller.rb @@ -239,7 +239,7 @@ class CmsController < MyProfileController end def search_communities_to_publish - render :text => find_by_contents(:profiles, user.memberships, params['q'], {:page => 1}, {:fields => ['name']})[:results].map {|community| {:id => community.id, :name => community.name} }.to_json + render :text => find_by_contents(:profiles, environment, user.memberships, params['q'], {:page => 1}, {:fields => ['name']})[:results].map {|community| {:id => community.id, :name => community.name} }.to_json end def publish @@ -482,8 +482,8 @@ class CmsController < MyProfileController generics = files.no_images if q.present? - @recent_files[:images] = find_by_contents(:images, images, q, paginate_options)[:results] - @recent_files[:generics] = find_by_contents(:generics, generics, q, paginate_options)[:results] + @recent_files[:images] = find_by_contents(:images, profile, images, q, paginate_options)[:results] + @recent_files[:generics] = find_by_contents(:generics, profile, generics, q, paginate_options)[:results] else @recent_files[:images] = images.paginate(paginate_options) @recent_files[:generics] = generics.paginate(paginate_options) -- libgit2 0.21.2