mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-04 16:28:50 +01:00
Make LIKE searches case-insensitive also on PgSQL
This commit is contained in:
parent
e89511aec8
commit
bbb9fc8809
7 changed files with 21 additions and 11 deletions
|
|
@ -766,7 +766,7 @@ class TodosController < ApplicationController
|
|||
|
||||
def get_not_completed_for_predecessor(relation, todo_id=nil)
|
||||
items = relation.todos.not_completed.
|
||||
where('(LOWER(todos.description) LIKE ?)', "%#{params[:term].downcase}%")
|
||||
where('(LOWER(todos.description) ' + Common.like_operator + '?)', "%#{params[:term].downcase}%")
|
||||
items = items.where("AND NOT(todos.id=?)", todo_id) unless todo_id.nil?
|
||||
|
||||
items.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue