app/models/task_manager/task.rb in task-manager-0.1.5 vs app/models/task_manager/task.rb in task-manager-0.1.6
- old
+ new
@@ -11,11 +11,12 @@
serialize :data, ActiveRecord::Coders::Hstore
default_value_for :status, :new
- attr_accessible :data, :deadline, :name, :reminding_at, :status, :task_type, :finished_at
+ attr_accessible :data, :deadline, :name, :reminding_at, :status,
+ :task_type, :finished_at, :autocompletable
validates_presence_of :name, :task_type, :status, :assignable, :deadline
def assignee
assignable.assignee
@@ -73,9 +74,13 @@
active.where("deadline <= ?", Time.now)
end
def remindable
active.where("reminding_at <= ?", Time.now)
+ end
+
+ def autocompletable
+ where(autocompletable: true)
end
end
end
end