Class: ParticipantToken

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/participant_token.rb

Overview

Associates a Participant with an action on a date and provides an obfuscated token representation.

Constant Summary collapse

TYPES =
%w( phq9 wai ).freeze
TOKEN_LENGTH =
10

Instance Method Summary collapse

Instance Method Details

#others_on_this_dayObject



22
23
24
25
26
# File 'app/models/participant_token.rb', line 22

def others_on_this_day
  self.class.where(participant_id: participant_id,
                   release_date: release_date)
      .where.not(id: id)
end

#to_sObject



18
19
20
# File 'app/models/participant_token.rb', line 18

def to_s
  token
end