Sha256: 0b7c1110eaa85fc94f491aff3e74738a32cfeff8a4000e9252114ccbf54544fc
Contents?: true
Size: 506 Bytes
Versions: 4
Compression:
Stored size: 506 Bytes
Contents
module Approval module RespondForm class Cancel < Base private def prepare instrument "cancel" do |payload| ::Approval::Request.transaction do request.lock! request.assign_attributes(state: :cancelled, cancelled_at: Time.current, respond_user_id: user.id) payload[:comment] = request.comments.new(user_id: user.id, content: reason) yield(request) end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems