Nearly there...

I've removed my experiment with lib/math as it was throwing an error.


git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@97 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
bsag 2005-06-05 11:22:00 +00:00
parent 78c118181c
commit 7af463c3f8
6 changed files with 3 additions and 459 deletions

View file

@ -2,7 +2,6 @@
# Likewise will all the methods added be available for all controllers.
require_dependency "login_system"
require_dependency "math/statistics"
require 'date'
@ -31,17 +30,4 @@ class ApplicationController < ActionController::Base
error_messages_for( obj ) unless instance_eval("@#{obj}").nil?
end
def av_completed
completed = Todo.find(:all, :conditions => "done=1")
days = []
completed.each do |i|
days << (i.completed - i.created).to_f
end
return days.average, days.max
end
end
class Array
include Math::Statistics
end

View file

@ -17,7 +17,7 @@ class ProjectController < ApplicationController
#
def list
@page_title = "TRACKS::List Projects"
@projects = Project.find(:all, :conditions => nil, :order => "done ASC, position ASC")
@projects = Project.find(:all, :conditions => nil, :order => "position ASC")
end
# Filter the projects to show just the one passed in the URL