OSDN Git Service

display milestones that are not marked with a due date as active
authorJames Newton <james@Zaphyous.com>
Thu, 19 Apr 2012 18:24:02 +0000 (13:24 -0500)
committerJames Newton <james@Zaphyous.com>
Thu, 19 Apr 2012 18:24:02 +0000 (13:24 -0500)
app/models/milestone.rb

index 20bc248..87e9d1d 100644 (file)
@@ -6,7 +6,7 @@ class Milestone < ActiveRecord::Base
   validates_presence_of :title
 
   def self.active
-    where("due_date > ? ", Date.today)
+    where("due_date > ? OR due_date IS NULL", Date.today)
   end
 
   def percent_complete