From 4c3698618523355af81ad49bad8df5d756e5bd70 Mon Sep 17 00:00:00 2001 From: Ron Walker Date: Thu, 25 Feb 2021 18:01:10 -0800 Subject: [PATCH] add feedback kind validation --- app/models/feedback.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/feedback.rb b/app/models/feedback.rb index d88cad8d8dc7c..47687d3bf296b 100644 --- a/app/models/feedback.rb +++ b/app/models/feedback.rb @@ -26,7 +26,9 @@ class Feedback < ApplicationRecord review accept reject].freeze + KIND_OPTIONS = %w[bug request].freeze validates :status, inclusion: { in: STATUS_OPTIONS } + validates :kind, inclusion: { in: KIND_OPTIONS } validates :title, presence: true, allow_blank: false belongs_to :user, optional: true