Class: Renalware::Letters::Letter::Approved
- Inherits:
-
Renalware::Letters::Letter
- Object
- ActiveRecord::Base
- ApplicationRecord
- Renalware::Letters::Letter
- Renalware::Letters::Letter::Approved
- Defined in:
- app/models/renalware/letters/letter/approved.rb
Constant Summary
Constants inherited from Renalware::Letters::Letter
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Renalware::Letters::Letter
#archive_recipients!, #archived?, #archived_by, #determine_counterpart_ccs, #effective_date, effective_date_sort, #find_cc_recipient_for_contact, for_event, #letter_event, #signed?, #subject?
Methods included from Accountable
#first_or_create_by!, #save_by, #save_by!, #update_by
Class Method Details
.policy_class ⇒ Object
8 9 10 |
# File 'app/models/renalware/letters/letter/approved.rb', line 8 def self.policy_class ApprovedLetterPolicy end |
Instance Method Details
#complete(by:) ⇒ Object
12 13 14 15 16 17 18 |
# File 'app/models/renalware/letters/letter/approved.rb', line 12 def complete(by:) becomes!(Completed).tap do |letter| letter.by = by letter.completed_by = by letter.completed_at = Time.current end end |