Sha256: aeeaba49e5d9989cee9309d2f46785f85f33eca0b954c3f4426d475c6f440280
Contents?: true
Size: 525 Bytes
Versions: 4
Compression:
Stored size: 525 Bytes
Contents
module Approval module RequestForm class Create < Base private def prepare ::Approval::Request.transaction do request.comments.new(user: user, content: reason) Array(records).each do |record| request.items.new( event: "create", resource_type: record.class.to_s, params: record.create_params_for_approval, ) end yield(request) end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems