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 )
TOKEN_LENGTH =
10

Instance Method Summary collapse

Instance Method Details

#others_on_this_dayObject



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

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

#to_sObject



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

def to_s
  token
end