diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-25 12:12:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-25 12:12:21 +0300 |
commit | 45760607bc053b7379f81edd5ea91dd2a6471522 (patch) | |
tree | 3c23388962d7d0eb31fde246718fc91c6acf5c26 /app/models/merge_request_reviewer.rb | |
parent | 0712a75cc03cb881dc40ae53a50d059822354ad8 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/merge_request_reviewer.rb')
-rw-r--r-- | app/models/merge_request_reviewer.rb | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/app/models/merge_request_reviewer.rb b/app/models/merge_request_reviewer.rb index 4a1f31a7f39..3a2c8603956 100644 --- a/app/models/merge_request_reviewer.rb +++ b/app/models/merge_request_reviewer.rb @@ -1,14 +1,7 @@ # frozen_string_literal: true class MergeRequestReviewer < ApplicationRecord - enum state: { - unreviewed: 0, - reviewed: 1 - } - - validates :state, - presence: true, - inclusion: { in: MergeRequestReviewer.states.keys } + include MergeRequestReviewerState belongs_to :merge_request belongs_to :reviewer, class_name: 'User', foreign_key: :user_id, inverse_of: :merge_request_reviewers |