Class: Participant
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Participant
- Includes:
- PgSearch
- Defined in:
- api/app/models/participant.rb
Overview
A person who participates in a SensoryTest, RecruitingCampaign or OnboardingConfiguration
Schema
- [String]
name
- [String]
code
- [Integer]
created_by_id
- [DateTime]
created_at
- [DateTime]
updated_at
- [Text]
note
- [Integer]
sensory_test_id
- [Integer]
event_id
- [Integer]
station_id
- [String]
locale
- [String]
email
- [String]
identity_token
- [Integer]
current_day
- [Integer]
subject_id
- [DateTime]
email_sent_at
- [Integer]
participant_group_id
- [Boolean]
agreed_to_terms
, default: false - [Integer]
recruiting_campaign_id
- [Boolean]
is_excluded
, default: false - [String]
display_name
- [Integer]
onboarding_configuration_id
- [String]
auth_token
- [DateTime]
checked_in_at
- [String]
ip_address
- [String]
external_id
- [DateTime]
signed_in_at
Class Method Summary collapse
- .create_from_subject(subject, event, participant_group, checked_in_at = nil) ⇒ Object
- .create_from_subject_for_campaign(subject, campaign, locale = nil) ⇒ Object
Instance Method Summary collapse
- #abandon ⇒ Object
- #block_code ⇒ Object
- #block_row_verification_code ⇒ Object
- #checked_in? ⇒ Boolean
- #clean_conflicting_non_exclusive_demographics(demographic_ids) ⇒ Object
- #current_serving ⇒ Object
- #current_serving_position ⇒ Object
- #current_start_time ⇒ Object
- #day_servings ⇒ Object
- #enforce_serving_order ⇒ Object
- #first_pending_day ⇒ Object
- #generate_auth_token ⇒ Object
- #get_block_row(verification_code) ⇒ Object
- #is_done ⇒ Object
- #is_done_for_day ⇒ Object
- #last_retake_day ⇒ Object
- #needs_consent_form ⇒ Object
- #next_day ⇒ Object
- #next_serving ⇒ Object
- #palate_cleanse_time_remaining ⇒ Object
- #participant_group ⇒ Object
- #populate_servings(verification_code = nil) ⇒ Object
- #sensory_test ⇒ Object
- #set_current_day(day) ⇒ Object
- #sign_out ⇒ Object
- #skip_next_serving(serving_id) ⇒ Object
- #sync_demographics_for_campaign(scoped_demographics, campaign) ⇒ Object
- #to_s ⇒ Object
- #valid_servings ⇒ Object