Class: Effective::ApplicantReference

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

Constant Summary collapse

KNOWNS =
['6 months - 1 year', '1 year - 2 years', '2 - 5 years', '5 - 10 years', 'More than 10 years']
RELATIONSHIPS =
['Supervisor', 'Employer', 'Colleague', 'Other']

Instance Method Summary collapse

Instance Method Details

#complete!Object



79
80
81
82
# File 'app/models/effective/applicant_reference.rb', line 79

def complete!
  completed!
  applicant.save!
end

#notify!Object



72
73
74
75
76
77
# File 'app/models/effective/applicant_reference.rb', line 72

def notify!
  raise('expected reference email') unless email.present?

  EffectiveMemberships.send_email(:applicant_reference_notification, self)
  update!(last_notified_at: Time.zone.now)
end

#to_sObject



68
69
70
# File 'app/models/effective/applicant_reference.rb', line 68

def to_s
  'reference'
end