diff options
Diffstat (limited to 'app/models/label.rb')
| -rw-r--r-- | app/models/label.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/label.rb b/app/models/label.rb index 17f293b698f..31f68c31e5c 100644 --- a/app/models/label.rb +++ b/app/models/label.rb @@ -4,4 +4,9 @@ class Label < ActiveRecord::Base validates :color, format: { with: /\A\#[0-9A-Fa-f]{3}{1,2}+\Z/ }, allow_blank: true validates :project, presence: true + validates :title, presence: true + + def name + title + end end |
