Class: Renalware::Transplants::RegistrationStatus
Instance Method Summary
collapse
#first_or_create_by!, #save_by, #save_by!, #update_by
Instance Method Details
#constraint_started_on_today_or_before ⇒ Object
26
27
28
|
# File 'app/models/renalware/transplants/registration_status.rb', line 26
def constraint_started_on_today_or_before
errors.add(:started_on, :invalid) if started_on > Time.zone.today
end
|
#terminated? ⇒ Boolean
22
23
24
|
# File 'app/models/renalware/transplants/registration_status.rb', line 22
def terminated?
terminated_on.present?
end
|
#to_s ⇒ Object
30
31
32
|
# File 'app/models/renalware/transplants/registration_status.rb', line 30
def to_s
description&.to_s
end
|