diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-04-24 21:35:06 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-04-24 21:39:33 +0400 |
commit | ae7bd9f7c0d78a4c039a8511d8d045eebd9706e4 (patch) | |
tree | af674ea3dc164b894561ceaf01facb7a30678512 /app/models | |
parent | 3bf1cff4215c8b60c4133c3e822495f046638583 (diff) |
Migrate invalid rows with missing iids or duplicates
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/milestone.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/milestone.rb b/app/models/milestone.rb index 6a2ca767030..39ab0b536a3 100644 --- a/app/models/milestone.rb +++ b/app/models/milestone.rb @@ -25,6 +25,7 @@ class Milestone < ActiveRecord::Base scope :active, -> { with_state(:active) } scope :closed, -> { with_state(:closed) } + scope :of_projects, ->(ids) { where(project_id: ids) } validates :title, presence: true validates :project, presence: true |