lowercase in commons searching for topic names
This commit is contained in:
parent
a248a866c1
commit
fcc1a6968c
1 changed files with 2 additions and 1 deletions
|
@ -22,7 +22,8 @@ class MainController < ApplicationController
|
||||||
@synapses = Array.new()
|
@synapses = Array.new()
|
||||||
if params[:topics_by_name] != ""
|
if params[:topics_by_name] != ""
|
||||||
like_keyword = "%"+params[:topics_by_name]+"%"
|
like_keyword = "%"+params[:topics_by_name]+"%"
|
||||||
@topics = Topic.where("name LIKE ?", like_keyword)
|
like_keyword.downcase! #convert to lowercase for better comparison
|
||||||
|
@topics = Topic.where("LOWER(name) LIKE ?", like_keyword)
|
||||||
end
|
end
|
||||||
if params[:topics_by_user_id] != ""
|
if params[:topics_by_user_id] != ""
|
||||||
@user = User.find(params[:topics_by_user_id])
|
@user = User.find(params[:topics_by_user_id])
|
||||||
|
|
Loading…
Reference in a new issue