Sha256: b36f8c53f57873ce2eb97649ed84c8a1c4b9c3165836121d97452ac6622a2dc4

Contents?: true

Size: 659 Bytes

Versions: 44

Compression:

Stored size: 659 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.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

44 entries across 44 versions & 1 rubygems

Version Path
think_feel_do_engine-3.17.2 app/models/think_feel_do_engine/reports/emotional_rating.rb
think_feel_do_engine-3.17.1 app/models/think_feel_do_engine/reports/emotional_rating.rb
think_feel_do_engine-3.17.0 app/models/think_feel_do_engine/reports/emotional_rating.rb
think_feel_do_engine-3.16.3 app/models/think_feel_do_engine/reports/emotional_rating.rb
think_feel_do_engine-3.16.2 app/models/think_feel_do_engine/reports/emotional_rating.rb
think_feel_do_engine-3.16.1 app/models/think_feel_do_engine/reports/emotional_rating.rb
think_feel_do_engine-3.15.7 app/models/think_feel_do_engine/reports/emotional_rating.rb
think_feel_do_engine-3.16.0 app/models/think_feel_do_engine/reports/emotional_rating.rb
think_feel_do_engine-3.15.6 app/models/think_feel_do_engine/reports/emotional_rating.rb
think_feel_do_engine-3.15.5 app/models/think_feel_do_engine/reports/emotional_rating.rb
think_feel_do_engine-3.15.4 app/models/think_feel_do_engine/reports/emotional_rating.rb
think_feel_do_engine-3.15.3 app/models/think_feel_do_engine/reports/emotional_rating.rb
think_feel_do_engine-3.15.2 app/models/think_feel_do_engine/reports/emotional_rating.rb
think_feel_do_engine-3.15.1 app/models/think_feel_do_engine/reports/emotional_rating.rb
think_feel_do_engine-3.15.0 app/models/think_feel_do_engine/reports/emotional_rating.rb
think_feel_do_engine-3.14.9 app/models/think_feel_do_engine/reports/emotional_rating.rb
think_feel_do_engine-3.14.8 app/models/think_feel_do_engine/reports/emotional_rating.rb
think_feel_do_engine-3.14.7 app/models/think_feel_do_engine/reports/emotional_rating.rb
think_feel_do_engine-3.14.6 app/models/think_feel_do_engine/reports/emotional_rating.rb
think_feel_do_engine-3.14.5 app/models/think_feel_do_engine/reports/emotional_rating.rb