summaryrefslogtreecommitdiff
path: root/app/models/label.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-12-08 13:40:32 +0100
committerDouwe Maan <douwe@gitlab.com>2015-12-08 13:40:32 +0100
commit926c3bef9fbda49d5cab268bcd83355142e945c1 (patch)
tree1dc2b7eb13485f0fc656cc913ca56e57b672b62a /app/models/label.rb
parent1a10945066d0da1801bb4cf89ce5f54996f1756f (diff)
parentf5430e48b42227f1c1874ca27c6907f0f704be28 (diff)
downloadgitlab-ce-reference-pipeline-and-caching.tar.gz
Merge branch 'master' into reference-pipeline-and-cachingreference-pipeline-and-caching
Diffstat (limited to 'app/models/label.rb')
-rw-r--r--app/models/label.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/label.rb b/app/models/label.rb
index bef6063fe88..220da10a6ab 100644
--- a/app/models/label.rb
+++ b/app/models/label.rb
@@ -27,9 +27,7 @@ class Label < ActiveRecord::Base
has_many :label_links, dependent: :destroy
has_many :issues, through: :label_links, source: :target, source_type: 'Issue'
- validates :color,
- format: { with: /\A#[0-9A-Fa-f]{6}\Z/ },
- allow_blank: false
+ validates :color, color: true, allow_blank: false
validates :project, presence: true, unless: Proc.new { |service| service.template? }
# Don't allow '?', '&', and ',' for label titles