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

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.

Returns:

  • (Boolean)


10
11
12
# File 'app/models/tasuku/taskables/taskable.rb', line 10

def completed_by? author
  !!responses.find_by(author: author)
end