Commit 0bbf8a132da9ca5d9a1b049b34f24bda3e1e18f1
1 parent
6e53d8be
Exists in
master
and in
29 other branches
Adapt find_by_contents call after search-suggestions feature
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
app/controllers/my_profile/cms_controller.rb
... | ... | @@ -239,7 +239,7 @@ class CmsController < MyProfileController |
239 | 239 | end |
240 | 240 | |
241 | 241 | def search_communities_to_publish |
242 | - 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 | |
242 | + 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 | |
243 | 243 | end |
244 | 244 | |
245 | 245 | def publish |
... | ... | @@ -482,8 +482,8 @@ class CmsController < MyProfileController |
482 | 482 | generics = files.no_images |
483 | 483 | |
484 | 484 | if q.present? |
485 | - @recent_files[:images] = find_by_contents(:images, images, q, paginate_options)[:results] | |
486 | - @recent_files[:generics] = find_by_contents(:generics, generics, q, paginate_options)[:results] | |
485 | + @recent_files[:images] = find_by_contents(:images, profile, images, q, paginate_options)[:results] | |
486 | + @recent_files[:generics] = find_by_contents(:generics, profile, generics, q, paginate_options)[:results] | |
487 | 487 | else |
488 | 488 | @recent_files[:images] = images.paginate(paginate_options) |
489 | 489 | @recent_files[:generics] = generics.paginate(paginate_options) | ... | ... |