Class: Effective::ApplicantReference
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Effective::ApplicantReference
- 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']
- RECOMMENDATIONS =
['Recommend for Membership', 'Do not recommend for Membership']
Instance Attribute Summary collapse
-
#email_form_skip ⇒ Object
Returns the value of attribute email_form_skip.
Instance Method Summary collapse
- #complete! ⇒ Object
- #notify! ⇒ Object
-
#reportable_scopes ⇒ Object
effective_reports.
- #to_s ⇒ Object
Instance Attribute Details
#email_form_skip ⇒ Object
Returns the value of attribute email_form_skip.
6 7 8 |
# File 'app/models/effective/applicant_reference.rb', line 6 def email_form_skip @email_form_skip end |
Instance Method Details
#complete! ⇒ Object
100 101 102 103 |
# File 'app/models/effective/applicant_reference.rb', line 100 def complete! completed! applicant.save! end |
#notify! ⇒ Object
93 94 95 96 97 98 |
# File 'app/models/effective/applicant_reference.rb', line 93 def notify! raise('expected reference email') unless email.present? EffectiveMemberships.send_email(:applicant_reference_notification, self) update!(last_notified_at: Time.zone.now) end |
#reportable_scopes ⇒ Object
effective_reports
57 58 59 |
# File 'app/models/effective/applicant_reference.rb', line 57 def reportable_scopes { in_progress: nil, done: nil, expired: nil } end |
#to_s ⇒ Object
89 90 91 |
# File 'app/models/effective/applicant_reference.rb', line 89 def to_s name.present? ? "#{model_name.human} from #{name}" : model_name.human end |