gitlab-org--gitlab-foss/app/models/concerns/merge_request_reviewer_state.rb

17 lines
300 B
Ruby

# frozen_string_literal: true
module MergeRequestReviewerState
extend ActiveSupport::Concern
included do
enum state: {
unreviewed: 0,
reviewed: 1,
attention_required: 2
}
validates :state,
presence: true,
inclusion: { in: self.states.keys }
end
end