Skip to content

Commit

Permalink
add feedback kind validation
Browse files Browse the repository at this point in the history
  • Loading branch information
RonWalker22 committed Feb 26, 2021
1 parent 29ac37d commit 4c36986
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/feedback.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4c36986

Please sign in to comment.