Sha256: eb135621bea5d7aae386bc1efc83d46d8e66a8a2125ad97673b8d797c3960997
Contents?: true
Size: 673 Bytes
Versions: 11
Compression:
Stored size: 673 Bytes
Contents
module ThinkFeelDoEngine module Reports # Collect metadata for all Participant Emotional Ratings. class EmotionalRating def self.columns %w( participant_id name rating created_at ) end def self.all Participant.not_moderator.select(:id, :study_id).map do |participant| participant.emotional_ratings.map do |emotional_rating| { participant_id: participant.study_id, name: emotional_rating.name, rating: emotional_rating.rating, created_at: emotional_rating.created_at.iso8601 } end end.flatten end end end end
Version data entries
11 entries across 11 versions & 1 rubygems