lib/approval/models/approval/respond_form/approve.rb in approval-0.2.3 vs lib/approval/models/approval/respond_form/approve.rb in approval-0.3.0

- old
+ new

@@ -4,10 +4,10 @@ validate :ensure_user_cannot_respond_to_my_request private def prepare - ::ActiveRecord::Base.transaction do + ::Approval::Request.transaction do request.lock! request.assign_attributes(state: :approved, approved_at: Time.current, respond_user: user) request.comments.new(user: user, content: reason) request.items.each(&:apply) yield(request)