mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 07:40: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
|
|
@ -23,14 +23,4 @@ class Todo < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue