Sha256: 2db824a574c0446534eb6e45d2be9e967c994311f5d035f127a34ad5af780dd1

Contents?: true

Size: 753 Bytes

Versions: 11

Compression:

Stored size: 753 Bytes

Contents

module SocialNetworking
  module Reports
    # Scenario: a Participant creates an off topic post.
    class OffTopicPost
      def self.columns
        %w( participant_id occurred_at description )
      end

      def self.all
        Participant.select(:id, :study_id).map do |participant|
          ::SocialNetworking::OnTheMindStatement
            .where(participant_id: participant.id).map do |post|
              {
                participant_id: participant.study_id,
                occurred_at: post.created_at.iso8601,
                description: post.description
              }
            end
        end.flatten
      end

      def self.to_csv
        ThinkFeelDoEngine::Reports::Reporter.new(self).write_csv
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
social_networking-0.11.8 app/models/social_networking/reports/off_topic_post.rb
social_networking-0.11.7 app/models/social_networking/reports/off_topic_post.rb
social_networking-0.11.6 app/models/social_networking/reports/off_topic_post.rb
social_networking-0.11.5 app/models/social_networking/reports/off_topic_post.rb
social_networking-0.11.4 app/models/social_networking/reports/off_topic_post.rb
social_networking-0.11.3 app/models/social_networking/reports/off_topic_post.rb
social_networking-0.11.2 app/models/social_networking/reports/off_topic_post.rb
social_networking-0.11.1 app/models/social_networking/reports/off_topic_post.rb
social_networking-0.11.0 app/models/social_networking/reports/off_topic_post.rb
social_networking-0.10.0 app/models/social_networking/reports/off_topic_post.rb
social_networking-0.9.3 app/models/social_networking/reports/off_topic_post.rb