Commit f4c6569d6638d946be723748718d6e851f4a17e2
1 parent
513ceaec
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Fix search autocomplete from profile design
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
app/controllers/box_organizer_controller.rb
... | ... | @@ -84,9 +84,9 @@ class BoxOrganizerController < ApplicationController |
84 | 84 | if request.xhr? and params[:query] |
85 | 85 | search = params[:query] |
86 | 86 | path_list = if boxes_holder.is_a?(Environment) && boxes_holder.enabled?('use_portal_community') && boxes_holder.portal_community |
87 | - boxes_holder.portal_community.articles.find(:all, :conditions=>"name ILIKE '%#{search}%' or path ILIKE '%#{search}%'", :limit=>20).map { |content| "/{portal}/"+content.path } | |
87 | + boxes_holder.portal_community.articles.find(:all, :conditions=>"articles.name ILIKE '%#{search}%' or articles.path ILIKE '%#{search}%'", :limit=>20).map { |content| "/{portal}/"+content.path } | |
88 | 88 | elsif boxes_holder.is_a?(Profile) |
89 | - boxes_holder.articles.find(:all, :conditions=>"name ILIKE '%#{search}%' or path ILIKE '%#{search}%'", :limit=>20).map { |content| "/{profile}/"+content.path } | |
89 | + boxes_holder.articles.find(:all, :conditions=>"articles.name ILIKE '%#{search}%' or articles.path ILIKE '%#{search}%'", :limit=>20).map { |content| "/{profile}/"+content.path } | |
90 | 90 | else |
91 | 91 | [] |
92 | 92 | end | ... | ... |