public
Description: Yet another GTD next action management tool. Written in Ruby, using Merb and DataMapper.
Homepage: http://elevate.cubicphuse.nl
Clone URL: git://github.com/ludo/to-elevate.git
Search Repo:
 * Try-out frozen-merb
 * Try-out projects open task count
ludo (author)
Mon Jul 21 08:25:09 -0700 2008
commit  521f04a511b6be115fca8e563fbb52e1fad16652
tree    06e98412a51ef484e272c1b3a37a599037a2f934
parent  eae02e398186a6a71a392b39f9addf7d5097130b
...
28
29
30
 
 
 
 
31
32
33
...
28
29
30
31
32
33
34
35
36
37
0
@@ -28,6 +28,10 @@ class Project
0
     @completed_at ? true : false
0
   end
0
 
0
+ def count_uncompleted_tasks
0
+ tasks.count(:completed_at => nil) || 0
0
+ end
0
+
0
   # Toggle the state of a project
0
   #
0
   # * When a project is not yet completed (<tt>completed_at</tt> is <tt>nil</tt>),
...
1
2
3
4
5
 
6
...
1
2
3
 
4
5
6
0
@@ -1,4 +1,4 @@
0
 %li{:id => "project-#{project.id}"}
0
   = toggle_field :boolean => false, :checked => project.completed?, :value => project.id
0
   = link_to project, url(:project, project)
0
- /%small== [#{project.tasks.count(:completed_at => nil) || 0}]
0
\ No newline at end of file
0
+ %small== [#{project.count_uncompleted_tasks}]
0
\ No newline at end of file
...
54
55
56
57
58
59
60
 
61
62
63
 
 
 
64
65
66
...
54
55
56
 
57
58
 
59
60
61
62
63
64
65
66
67
68
0
@@ -54,13 +54,15 @@ Merb.push_path(:lib, Merb.root / "lib") # uses **/*.rb as path glob.
0
 # dependency "RedCloth", "> 3.0"
0
 # OR
0
 # dependencies "RedCloth" => "> 3.0", "ruby-aes-cext" => "= 1.0"
0
-dependency "merb-slices"
0
 
0
 dependency "merb-assets"
0
-dependency "merb-auth"
0
+dependency "merb-freezer"
0
 dependency "merb-haml"
0
 dependency "merb_helpers"
0
 dependency "merb-jquery"
0
+dependency "merb-slices"
0
+
0
+dependency "merb-auth"
0
 
0
 dependency "dm-aggregates"
0
 dependency "dm-timestamps"

Comments

    No one has commented yet.