Sha256: 41ea31274517a9484f87f1d718c93ae17883030559da9e8328e85d95780b4c4d
Contents?: true
Size: 449 Bytes
Versions: 9
Compression:
Stored size: 449 Bytes
Contents
require_dependency "renalware/letters" require "attr_extras" module Renalware module Letters class CompleteLetter include Broadcasting pattr_initialize :letter class << self alias_method :build, :new end def call(by:) Letter.transaction do @letter = letter.complete(by: by) letter.save! broadcast(:letter_completed, letter) end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems