summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-05-07 16:35:37 +0000
committerDouwe Maan <douwe@gitlab.com>2018-05-07 16:35:37 +0000
commitf50d8079f0080e60a2e2c66f0cc93fc9bd6b1c80 (patch)
tree6a04d23ec3e93d5a90f401d3f36f216621e57c48 /app/models
parente1f6400f317160c5a1eb7ab792e7e25d1e1bb1e7 (diff)
parent1019dff2371b30979b33ce823abeadadad9cfab3 (diff)
downloadgitlab-ce-f50d8079f0080e60a2e2c66f0cc93fc9bd6b1c80.tar.gz
Merge branch 'ccr/weight_1481' into 'master'
Backport of 1481-changing-weight-values-should-trigger-system-notes See merge request gitlab-org/gitlab-ce!18699
Diffstat (limited to 'app/models')
-rw-r--r--app/models/system_note_metadata.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/system_note_metadata.rb b/app/models/system_note_metadata.rb
index 29035480371..1c2161accc4 100644
--- a/app/models/system_note_metadata.rb
+++ b/app/models/system_note_metadata.rb
@@ -17,7 +17,11 @@ class SystemNoteMetadata < ActiveRecord::Base
].freeze
validates :note, presence: true
- validates :action, inclusion: ICON_TYPES, allow_nil: true
+ validates :action, inclusion: { in: :icon_types }, allow_nil: true
belongs_to :note
+
+ def icon_types
+ ICON_TYPES
+ end
end