From 702180e8b29996b85cb58c6a9eec9374d0b7859b Mon Sep 17 00:00:00 2001 From: bsag Date: Thu, 10 Mar 2005 15:17:20 +0000 Subject: [PATCH] Minor tidying up. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@40 a4c988fc-2ded-0310-b66e-134b36920a42 --- tracks/app/controllers/application.rb | 2 +- tracks/app/models/todo.rb | 12 +----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/tracks/app/controllers/application.rb b/tracks/app/controllers/application.rb index c6f2f491..682d6a52 100644 --- a/tracks/app/controllers/application.rb +++ b/tracks/app/controllers/application.rb @@ -22,5 +22,5 @@ class ApplicationController < ActionController::Base end total = Todo.find_all("done=0").length - sub end - + end \ No newline at end of file diff --git a/tracks/app/models/todo.rb b/tracks/app/models/todo.rb index 5d20267d..54511650 100644 --- a/tracks/app/models/todo.rb +++ b/tracks/app/models/todo.rb @@ -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