Commit 714bfe7d4b2dc3f51826cc5dac8c620013f5011d
1 parent
ee1833bf
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Avoid ambiguity on profile autocomplete search
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/controllers/box_organizer_controller.rb
@@ -94,7 +94,7 @@ class BoxOrganizerController < ApplicationController | @@ -94,7 +94,7 @@ class BoxOrganizerController < ApplicationController | ||
94 | path_list = if boxes_holder.is_a?(Environment) && boxes_holder.enabled?('use_portal_community') && boxes_holder.portal_community | 94 | path_list = if boxes_holder.is_a?(Environment) && boxes_holder.enabled?('use_portal_community') && boxes_holder.portal_community |
95 | boxes_holder.portal_community.articles.find(:all, :conditions=>"name ILIKE '%#{search}%' or path ILIKE '%#{search}%'", :limit=>20).map { |content| "/{portal}/"+content.path } | 95 | boxes_holder.portal_community.articles.find(:all, :conditions=>"name ILIKE '%#{search}%' or path ILIKE '%#{search}%'", :limit=>20).map { |content| "/{portal}/"+content.path } |
96 | elsif boxes_holder.is_a?(Profile) | 96 | elsif boxes_holder.is_a?(Profile) |
97 | - boxes_holder.articles.find(:all, :conditions=>"name ILIKE '%#{search}%' or path ILIKE '%#{search}%'", :limit=>20).map { |content| "/{profile}/"+content.path } | 97 | + boxes_holder.articles.find(:all, :conditions=>"articles.name ILIKE '%#{search}%' or articles.path ILIKE '%#{search}%'", :limit=>20).map { |content| "/{profile}/"+content.path } |
98 | else | 98 | else |
99 | [] | 99 | [] |
100 | end | 100 | end |