diff options
author | James Lopez <james@jameslopez.es> | 2016-07-01 15:34:10 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-07-01 15:34:10 +0200 |
commit | f29c30475e621dedae24791ae9b144b6bef2f80a (patch) | |
tree | 3850dee7b3703d2e0046015ec84ed700379b0124 /app/models/milestone.rb | |
parent | d6d0a35598c6fefd31dcc6b43bc2698792788faa (diff) | |
download | gitlab-ce-f29c30475e621dedae24791ae9b144b6bef2f80a.tar.gz |
use has_many relationship with events
Diffstat (limited to 'app/models/milestone.rb')
-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 2283376c8ac..2bd7f198030 100644 --- a/app/models/milestone.rb +++ b/app/models/milestone.rb @@ -11,13 +11,13 @@ class Milestone < ActiveRecord::Base include Referable include StripAttribute include Milestoneish - include Eventable belongs_to :project has_many :issues has_many :labels, -> { distinct.reorder('labels.title') }, through: :issues has_many :merge_requests has_many :participants, -> { distinct.reorder('users.name') }, through: :issues, source: :assignee + has_many :events, as: :target, dependent: :destroy scope :active, -> { with_state(:active) } scope :closed, -> { with_state(:closed) } |