mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
Minor tidying up.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@40 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
05c037ef3f
commit
702180e8b2
2 changed files with 2 additions and 12 deletions
|
|
@ -22,5 +22,5 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
total = Todo.find_all("done=0").length - sub
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
|
@ -22,15 +22,5 @@ class Todo < ActiveRecord::Base
|
|||
self.completed = Time.now()
|
||||
end
|
||||
end
|
||||
|
||||
# Piggy-back technique to avoid superfluous calls to the DB
|
||||
#
|
||||
def self.find_all_with_project_name(filter,sort)
|
||||
find_by_sql(
|
||||
"SELECT todos.*, projects.name as project_name " +
|
||||
"FROM todos, projects " +
|
||||
"WHERE #{filter} AND todos.project_id = projects.id " +
|
||||
"ORDER BY #{sort}"
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue