lib/approval/models/approval/respond_form/cancel.rb in approval-0.3.4 vs lib/approval/models/approval/respond_form/cancel.rb in approval-0.3.5
- old
+ new
@@ -4,11 +4,11 @@
private
def prepare
::Approval::Request.transaction do
request.lock!
- request.assign_attributes(state: :cancelled, cancelled_at: Time.current, respond_user: user)
- request.comments.new(user: user, content: reason)
+ 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