Sha256: 2966fd522b00d39de75c7f97703f8df447c229f639a995630ffc58cd90d2c60e

Contents?: true

Size: 751 Bytes

Versions: 13

Compression:

Stored size: 751 Bytes

Contents

module ThinkFeelDoEngine
  module Reports
    # Scenario: a Participant clicks, causes a page to render,
    # starts/pauses/finishes a video, etc.
    class Event
      def self.columns
        %w( participant_id emitted_at current_url headers kind )
      end

      def self.all
        Participant.select(:id, :study_id).map do |participant|
          EventCapture::Event.where(participant_id: participant.id)
            .map do |event|
            {
              participant_id: participant.study_id,
              emitted_at: event.emitted_at.iso8601,
              current_url: event.current_url,
              headers: event.headers,
              kind: event.kind
            }
          end
        end.flatten
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
think_feel_do_engine-3.12.5 app/models/think_feel_do_engine/reports/event.rb
think_feel_do_engine-3.12.4 app/models/think_feel_do_engine/reports/event.rb
think_feel_do_engine-3.12.3 app/models/think_feel_do_engine/reports/event.rb
think_feel_do_engine-3.12.2 app/models/think_feel_do_engine/reports/event.rb
think_feel_do_engine-3.12.1 app/models/think_feel_do_engine/reports/event.rb
think_feel_do_engine-3.12.0 app/models/think_feel_do_engine/reports/event.rb
think_feel_do_engine-3.11.3 app/models/think_feel_do_engine/reports/event.rb
think_feel_do_engine-3.11.0 app/models/think_feel_do_engine/reports/event.rb
think_feel_do_engine-3.10.10 app/models/think_feel_do_engine/reports/event.rb
think_feel_do_engine-3.10.9 app/models/think_feel_do_engine/reports/event.rb
think_feel_do_engine-3.10.8 app/models/think_feel_do_engine/reports/event.rb
think_feel_do_engine-3.10.7 app/models/think_feel_do_engine/reports/event.rb
think_feel_do_engine-3.10.6 app/models/think_feel_do_engine/reports/event.rb