Class: Flyboy::TaskComment

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/flyboy/task_comment.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ TaskComment

Returns a new instance of TaskComment.



11
12
13
14
# File 'app/models/flyboy/task_comment.rb', line 11

def initialize(*args)
  super
  self.date = Time.now if date.nil?
end

Instance Method Details

#update_task_progressObject



18
19
20
21
22
23
# File 'app/models/flyboy/task_comment.rb', line 18

def update_task_progress
  task.update_attributes(
    :progress => progress,
    :done     => progress.equal?(100)
  )
end