Class: Dorsale::Flyboy::TaskComment
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Dorsale::Flyboy::TaskComment
- Defined in:
- app/models/dorsale/flyboy/task_comment.rb
Instance Method Summary collapse
Methods inherited from ApplicationRecord
Methods included from DefaultValuesConcern
Instance Method Details
#assign_default_values ⇒ Object
15 16 17 18 |
# File 'app/models/dorsale/flyboy/task_comment.rb', line 15 def assign_default_values assign_default :date, Time.zone.now assign_default :progress, (task ? task.progress : 0) end |
#update_task_progress ⇒ Object
22 23 24 25 26 27 |
# File 'app/models/dorsale/flyboy/task_comment.rb', line 22 def update_task_progress task.update!( :progress => progress, :done => progress.equal?(100) ) end |