Fix a bug when generating predecessor autocomplete data

This commit is contained in:
Matt Rogers 2013-04-25 21:13:18 -05:00
parent a1b270699d
commit a60b4389cd

View file

@ -847,7 +847,7 @@ class TodosController < ApplicationController
reorder('description ASC').
limit(10) unless @todo.project.nil?
# Then look in the current context, excluding @todo itself
@items = @todo.context.todos.not_completed
@items = @todo.context.todos.not_completed.
where('(LOWER(todos.description) LIKE ?) AND NOT(todos.id=?)', "%#{params[:term].downcase}%", @todo.id).
includes(:context, :project).
reorder('description ASC').