Sha256: b2d5a9305edea612c4f73d779dc764617dcac1689f9cc8434870fd78e097b983
Contents?: true
Size: 531 Bytes
Versions: 4
Compression:
Stored size: 531 Bytes
Contents
module Approval module RequestForm class Create < Base private def prepare ::Approval::Request.transaction do request.comments.new(user_id: user.id, 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