Sha256: 0fb2b00723d47f0bb33deda04f84593025bb51a2c7010606145757867f655e23

Contents?: true

Size: 461 Bytes

Versions: 2

Compression:

Stored size: 461 Bytes

Contents

# Holds a value given by a user at a certain time estimating how many work-points (gummybears?)
# still remain until this task is completed.
#
# A value of zero indicated that the task is completed.
class Estimate < ActiveRecord::Base
  belongs_to :task
  belongs_to :user

  validates_presence_of :task_id
  validates_associated :task
  validates_presence_of :todo
    
  after_create do |e|
    e.task.finish(Task::COMPLETED, false) if todo == 0
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
backlog-0.37.2 app/models/estimate.rb
backlog-0.37.1 app/models/estimate.rb