lib/approval/models/approval/request_form/create.rb in approval-0.2.3 vs lib/approval/models/approval/request_form/create.rb in approval-0.3.0

- old
+ new

@@ -2,17 +2,17 @@ module RequestForm class Create < Base private def prepare - ::ActiveRecord::Base.transaction do + ::Approval::Request.transaction do request = user.approval_requests.new 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.params_for_approval, + params: record.create_params_for_approval, ) end yield(request) end end