lib/approval/models/approval/request_form/update.rb in approval-0.2.3 vs lib/approval/models/approval/request_form/update.rb in approval-0.3.0
- old
+ new
@@ -2,18 +2,18 @@
module RequestForm
class Update < 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: "update",
resource_type: record.class.to_s,
resource_id: record.id,
- params: record.params_for_approval,
+ params: record.update_params_for_approval,
)
end
yield(request)
end
end