Class: ThinkFeelDoEngine::Reports::PatientActivity
- Inherits:
-
Object
- Object
- ThinkFeelDoEngine::Reports::PatientActivity
- Defined in:
- app/models/think_feel_do_engine/reports/patient_activity.rb
Overview
Collect metadata for each Participant Activity.
Class Method Summary collapse
Class Method Details
.all ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/models/think_feel_do_engine/reports/patient_activity.rb', line 10 def self.all Participant.not_moderator.select(:id, :study_id).map do |participant| participant.activities.map do |activity| { participant_id: participant.study_id, activity_title: activity.title, created_at: activity.created_at.iso8601 } end end.flatten end |
.columns ⇒ Object
6 7 8 |
# File 'app/models/think_feel_do_engine/reports/patient_activity.rb', line 6 def self.columns %w( participant_id activity_title created_at ) end |