Sha256: 5d96c07e18c574c1acbbfdbbf53cf5540eeb2ef20e34986a4cb939067e223a39
Contents?: true
Size: 417 Bytes
Versions: 4
Compression:
Stored size: 417 Bytes
Contents
module Approval module RespondForm class Cancel < Base private def prepare ::Approval::Request.transaction do request.lock! request.assign_attributes(state: :cancelled, cancelled_at: Time.current, respond_user_id: user.id) request.comments.new(user_id: user.id, content: reason) yield(request) end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems