Sha256: 22d08edebaef4ce62ebf2ad5598f74f378023e4d1e71ab7835c7a1069e38bf18

Contents?: true

Size: 612 Bytes

Versions: 13

Compression:

Stored size: 612 Bytes

Contents

# frozen_string_literal: true
module ThinkFeelDoEngine
  module Reports
    # Scenario: a Participant logs into the site.
    class Login
      def self.columns
        %w( participant_id occurred_at )
      end

      def self.all
        Participant.not_moderator.select(:id, :study_id).map do |participant|
          ParticipantLoginEvent
            .where(participant_id: participant.id).map do |event|
              {
                participant_id: participant.study_id,
                occurred_at: event.created_at.iso8601
              }
            end
        end.flatten
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
think_feel_do_engine-3.22.9 app/models/think_feel_do_engine/reports/login.rb
think_feel_do_engine-3.22.8 app/models/think_feel_do_engine/reports/login.rb
think_feel_do_engine-3.22.7 app/models/think_feel_do_engine/reports/login.rb
think_feel_do_engine-3.22.6 app/models/think_feel_do_engine/reports/login.rb
think_feel_do_engine-3.22.5 app/models/think_feel_do_engine/reports/login.rb
think_feel_do_engine-3.22.4 app/models/think_feel_do_engine/reports/login.rb
think_feel_do_engine-3.22.2 app/models/think_feel_do_engine/reports/login.rb
think_feel_do_engine-3.22.1 app/models/think_feel_do_engine/reports/login.rb
think_feel_do_engine-3.22.0 app/models/think_feel_do_engine/reports/login.rb
think_feel_do_engine-3.21.2 app/models/think_feel_do_engine/reports/login.rb
think_feel_do_engine-3.21.1 app/models/think_feel_do_engine/reports/login.rb
think_feel_do_engine-3.21.0 app/models/think_feel_do_engine/reports/login.rb
think_feel_do_engine-3.20.1 app/models/think_feel_do_engine/reports/login.rb