From 2050e137bf8016db6bd99985b31c5f48cd5988d3 Mon Sep 17 00:00:00 2001 From: Robert Best Date: Thu, 13 Feb 2014 22:32:51 -0500 Subject: [PATCH] Update topics_controller.rb We were missing the .downcase on term, so no queries with a capital ever find a match See !connor --- app/controllers/topics_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/topics_controller.rb b/app/controllers/topics_controller.rb index 271f7a19..e72f684c 100644 --- a/app/controllers/topics_controller.rb +++ b/app/controllers/topics_controller.rb @@ -10,6 +10,7 @@ class TopicsController < ApplicationController @current = current_user term = params[:term] if term && !term.empty? + # !connor term here needs to have .downcase @topics = Topic.where('LOWER("name") like ?', term + '%').order('"name"') #read this next line as 'delete a topic if its private and you're either 1. logged out or 2. logged in but not the topic creator