From 3b7d3aa487e98fbbd38c3a8170d11b54005d7f5a Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 10 Jun 2013 10:42:06 -0400 Subject: [PATCH] FIX: Search wasn't using the lowercase username for finding the context. --- app/controllers/search_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index a7ba001214a..7dc0421b6f9 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -22,7 +22,7 @@ class SearchController < ApplicationController # A user is found by username context_obj = nil if search_context[:type] == 'user' - context_obj = klass.where(username: params[:search_context][:id]).first + context_obj = klass.where(username_lower: params[:search_context][:id].downcase).first else context_obj = klass.where(id: params[:search_context][:id]).first end