diff options
author | Zeger-Jan van de Weg <mail@zjvandeweg.nl> | 2016-02-02 12:44:30 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <mail@zjvandeweg.nl> | 2016-02-08 14:45:32 +0300 |
commit | 308c967d0dee4b56613d4b285fbd0cf0a1c3ce69 (patch) | |
tree | c91a37f7c7903b278f2a66c60c83ace7d59ffeef /app | |
parent | 05519b554a49057f6551595a3bc3f01e140f3c0b (diff) |
Validate uniqueness of milestone title per project
Fixes #3903
Diffstat (limited to 'app')
-rw-r--r-- | app/models/milestone.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/milestone.rb b/app/models/milestone.rb index c9a0ad8b9b6..9c4476c768e 100644 --- a/app/models/milestone.rb +++ b/app/models/milestone.rb @@ -34,7 +34,7 @@ class Milestone < ActiveRecord::Base scope :closed, -> { with_state(:closed) } scope :of_projects, ->(ids) { where(project_id: ids) } - validates :title, presence: true + validates :title, presence: true, uniqueness: { scope: :project_id } validates :project, presence: true strip_attributes :title |