Module: Gamification::Concerns::Models::Task::ClassMethods
- Defined in:
- lib/gamification/concerns/models/task.rb
Instance Method Summary collapse
-
#complete_for(subject) ⇒ Object
Complete all tasks for the given subject.
Instance Method Details
#complete_for(subject) ⇒ Object
Complete all tasks for the given subject.
subject - An ActiveRecord model that can receive scorings.
46 47 48 |
# File 'lib/gamification/concerns/models/task.rb', line 46 def complete_for subject all.map { |task| task.complete_for subject unless task.completed_by? subject }.compact end |