From 714bfe7d4b2dc3f51826cc5dac8c620013f5011d Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Wed, 7 Jan 2015 18:21:13 -0300 Subject: [PATCH] Avoid ambiguity on profile autocomplete search --- app/controllers/box_organizer_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/box_organizer_controller.rb b/app/controllers/box_organizer_controller.rb index d000550..f1da75d 100644 --- a/app/controllers/box_organizer_controller.rb +++ b/app/controllers/box_organizer_controller.rb @@ -94,7 +94,7 @@ class BoxOrganizerController < ApplicationController 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 } 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