Sha256: 8f00c4a488704c43da50a3690a8035a2a30d348c23b3099f0ff524571b17afd0
Contents?: true
Size: 768 Bytes
Versions: 4
Compression:
Stored size: 768 Bytes
Contents
# frozen_string_literal: true module SocialNetworking module Reports # Scenario: a Participant shares data from a tool. class ToolShare def self.columns %w( participant_id item_type shared_at ) end def self.all Participant.select(:id, :study_id).map do |participant| ::SocialNetworking::SharedItem .where(participant_id: participant.id, is_public: true).map do |i| { participant_id: participant.study_id, item_type: i.item_type, shared_at: i.created_at.iso8601 } end end.flatten end def self.to_csv ThinkFeelDoEngine::Reports::Reporter.new(self).write_csv end end end end
Version data entries
4 entries across 4 versions & 1 rubygems