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
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
85 86 87 88 |
# File 'app/models/effective/applicant_reference.rb', line 85 def complete! completed! applicant.save! end |
#notify! ⇒ Object
78 79 80 81 82 83 |
# File 'app/models/effective/applicant_reference.rb', line 78 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_s ⇒ Object
74 75 76 |
# File 'app/models/effective/applicant_reference.rb', line 74 def to_s name.present? ? "#{model_name.human} from #{name}" : model_name.human end |