Commit 33ddf71a authored by Dylan Griffith's avatar Dylan Griffith

Merge branch '12814-correct-vuln-feedback-validation-note' into 'master'

Chore: correct VulnFeedback enum validation description

Closes #12814

See merge request gitlab-org/gitlab!34402
parents ac4de842 f5ec38f1
......@@ -49,8 +49,8 @@ module Vulnerabilities
record
end
# Rails 5.0 does not properly handle validation of enums in select queries such as find_or_initialize_by.
# This method, and calls to it can be removed when we are on Rails 5.2.
# Rails does not validate enums in select queries such as `find_or_initialize_by`,
# So we raise an ArgumentError early to return a human-readable error
def self.validate_enums(feedback_params)
unless feedback_types.include?(feedback_params[:feedback_type])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment