Class: Renalware::Modalities::Modality
Instance Method Summary
collapse
#first_or_create_by!, #save_by, #save_by!, #update_by
Instance Method Details
#terminate_by(user, on:) ⇒ Object
25
26
27
28
29
|
# File 'app/models/renalware/modalities/modality.rb', line 25
def terminate_by(user, on:)
self.ended_on = on
self.state = "terminated"
save_by!(user)
end
|
#terminated? ⇒ Boolean
35
36
37
|
# File 'app/models/renalware/modalities/modality.rb', line 35
def terminated?
state == "terminated"
end
|
#to_s ⇒ Object
31
32
33
|
# File 'app/models/renalware/modalities/modality.rb', line 31
def to_s
description.name
end
|