Update topics_controller.rb
We were missing the .downcase on term, so no queries with a capital ever find a match See !connor
This commit is contained in:
parent
7c28e20b00
commit
2050e137bf
1 changed files with 1 additions and 0 deletions
|
@ -10,6 +10,7 @@ class TopicsController < ApplicationController
|
||||||
@current = current_user
|
@current = current_user
|
||||||
term = params[:term]
|
term = params[:term]
|
||||||
if term && !term.empty?
|
if term && !term.empty?
|
||||||
|
# !connor term here needs to have .downcase
|
||||||
@topics = Topic.where('LOWER("name") like ?', term + '%').order('"name"')
|
@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
|
#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
|
||||||
|
|
Loading…
Reference in a new issue