From d08143f8142567b59aafcb28320c433489f085bb Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Thu, 21 Apr 2016 12:00:35 +0800 Subject: [PATCH] fix user search error --- app/controllers/main_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb index d8ce06b6..f7d9a84a 100644 --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -133,7 +133,8 @@ class MainController < ApplicationController #remove "mapper:" if appended at beginning term = term[7..-1] if term.downcase[0..6] == "mapper:" search = term.downcase + '%' - builder = policy_scope(User) # TODO do I need to policy scope? I guess yes to verify_policy_scoped + skip_policy_scope # TODO builder = policy_scope(User) + builder = User builder = builder.where('LOWER("name") like ?', search) @mappers = builder.order(:name) else