Class: Item
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Item
- Defined in:
- lib/my_todo/models/item.rb
Overview
Handles business logic for todo item
Constant Summary collapse
- INCOMPLETE_STATUSES =
['None', 'In Progress', 'Waiting Feedback']
- COMPLETE_STATUSES =
['Complete', 'Punted']
- DETAILED_STATUSES =
INCOMPLETE_STATUSES + COMPLETE_STATUSES
Instance Method Summary collapse
-
#update_done ⇒ Object
set done attribute based on detailed_status set.
Instance Method Details
#update_done ⇒ Object
set done attribute based on detailed_status set
29 30 31 |
# File 'lib/my_todo/models/item.rb', line 29 def update_done self.done = true if COMPLETE_STATUSES.include? self.detailed_status end |