Module: Tasuku::Taskables::Taskable
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/models/tasuku/taskables/taskable.rb
Defined Under Namespace
Modules: ClassMethods, Submission Classes: Response
Instance Method Summary collapse
-
#completed_by?(author) ⇒ Boolean
Determine whether the task has been completed by the given author.
Instance Method Details
#completed_by?(author) ⇒ Boolean
Determine whether the task has been completed by the given author.
author - Any model that can complete tasks.
Returns a Boolean.
10 11 12 |
# File 'app/models/tasuku/taskables/taskable.rb', line 10 def completed_by? !!responses.find_by(author: ) end |