Class: Renalware::Transplants::RegistrationStatus

Inherits:
ApplicationRecord
  • Object
show all
Includes:
Accountable
Defined in:
app/models/renalware/transplants/registration_status.rb

Instance Method Summary collapse

Methods included from Accountable

#first_or_create_by!, #save_by, #save_by!, #update_by

Instance Method Details

#constraint_started_on_today_or_beforeObject



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

Returns:

  • (Boolean)


22
23
24
# File 'app/models/renalware/transplants/registration_status.rb', line 22

def terminated?
  terminated_on.present?
end

#to_sObject



30
31
32
# File 'app/models/renalware/transplants/registration_status.rb', line 30

def to_s
  description&.to_s
end