Sha256: 297286bd229ed359a31b15a863c219fe8cc08defddbcafd7d178e4a3fc4faed0
Contents?: true
Size: 738 Bytes
Versions: 11
Compression:
Stored size: 738 Bytes
Contents
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
11 entries across 11 versions & 1 rubygems