From f4c6569d6638d946be723748718d6e851f4a17e2 Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Wed, 3 Dec 2014 07:34:22 -0300 Subject: [PATCH] Fix search autocomplete from profile design --- app/controllers/box_organizer_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/box_organizer_controller.rb b/app/controllers/box_organizer_controller.rb index 6ca6f67..674c4ac 100644 --- a/app/controllers/box_organizer_controller.rb +++ b/app/controllers/box_organizer_controller.rb @@ -84,9 +84,9 @@ class BoxOrganizerController < ApplicationController if request.xhr? and params[:query] search = params[:query] path_list = if boxes_holder.is_a?(Environment) && boxes_holder.enabled?('use_portal_community') && boxes_holder.portal_community - boxes_holder.portal_community.articles.find(:all, :conditions=>"name ILIKE '%#{search}%' or path ILIKE '%#{search}%'", :limit=>20).map { |content| "/{portal}/"+content.path } + boxes_holder.portal_community.articles.find(:all, :conditions=>"articles.name ILIKE '%#{search}%' or articles.path ILIKE '%#{search}%'", :limit=>20).map { |content| "/{portal}/"+content.path } elsif boxes_holder.is_a?(Profile) - boxes_holder.articles.find(:all, :conditions=>"name ILIKE '%#{search}%' or path ILIKE '%#{search}%'", :limit=>20).map { |content| "/{profile}/"+content.path } + boxes_holder.articles.find(:all, :conditions=>"articles.name ILIKE '%#{search}%' or articles.path ILIKE '%#{search}%'", :limit=>20).map { |content| "/{profile}/"+content.path } else [] end -- libgit2 0.21.2