mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-26 12:08:47 +01:00
fix #1266. Please test and reopen if necessary. I think I prefixed all queries with the right table
This commit is contained in:
parent
bb998ba3fa
commit
0012a56ecb
1 changed files with 3 additions and 3 deletions
|
|
@ -809,7 +809,7 @@ class TodosController < ApplicationController
|
|||
@items = current_user.todos.find(:all,
|
||||
:include => [:context, :project],
|
||||
:conditions => [ '(todos.state = ? OR todos.state = ? OR todos.state = ?) AND ' +
|
||||
'NOT (id = ?) AND lower(description) LIKE ? AND project_id = ?',
|
||||
'NOT (todos.id = ?) AND lower(todos.description) LIKE ? AND todos.project_id = ?',
|
||||
'active', 'pending', 'deferred',
|
||||
@todo.id,
|
||||
'%' + params[:predecessor_list].downcase + '%',
|
||||
|
|
@ -821,7 +821,7 @@ class TodosController < ApplicationController
|
|||
@items = current_user.todos.find(:all,
|
||||
:include => [:context, :project],
|
||||
:conditions => [ '(todos.state = ? OR todos.state = ? OR todos.state = ?) AND ' +
|
||||
'NOT (id = ?) AND lower(description) LIKE ?',
|
||||
'NOT (todos.id = ?) AND lower(todos.description) LIKE ?',
|
||||
'active', 'pending', 'deferred',
|
||||
params[:id], '%' + params[:term].downcase + '%' ],
|
||||
:order => 'description ASC',
|
||||
|
|
@ -832,7 +832,7 @@ class TodosController < ApplicationController
|
|||
# New todo - TODO: Filter on project
|
||||
@items = current_user.todos.find(:all,
|
||||
:include => [:context, :project],
|
||||
:conditions => [ '(todos.state = ? OR todos.state = ? OR todos.state = ?) AND lower(description) LIKE ?',
|
||||
:conditions => [ '(todos.state = ? OR todos.state = ? OR todos.state = ?) AND lower(todos.description) LIKE ?',
|
||||
'active', 'pending', 'deferred',
|
||||
'%' + params[:term].downcase + '%' ],
|
||||
:order => 'description ASC',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue