Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChantal Rollison <crollison@gitlab.com>2018-05-03 00:34:05 +0300
committerChantal Rollison <crollison@gitlab.com>2018-05-03 21:18:51 +0300
commit1019dff2371b30979b33ce823abeadadad9cfab3 (patch)
tree3926d84cb32cc42a03d9cd84854d0c6ea91e6161 /app/models/system_note_metadata.rb
parentff77806150a0f965694d9492657e11f6891eba11 (diff)
Backport of 1481-changing-weight-values-should-trigger-system-notes
Diffstat (limited to 'app/models/system_note_metadata.rb')
-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