diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-04-08 15:48:09 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-04-08 15:48:09 -0300 |
commit | 7afeace35474249c9aeb898f3a56180745106169 (patch) | |
tree | 36bd5104fb42d739b54378fc2fb5e0cc9714e538 /app/models/concerns/issuable.rb | |
parent | 877f56c9370eef9affef3cc3438c5d4fe11b123c (diff) | |
parent | 0d216c194c5a7b72c98f0f06b4fc7fd0ba358c0e (diff) | |
download | gitlab-ce-7afeace35474249c9aeb898f3a56180745106169.tar.gz |
Merge branch 'master' into decouple-member-notification
Diffstat (limited to 'app/models/concerns/issuable.rb')
-rw-r--r-- | app/models/concerns/issuable.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb index cf5b2c71675..afa2ca039ae 100644 --- a/app/models/concerns/issuable.rb +++ b/app/models/concerns/issuable.rb @@ -19,6 +19,7 @@ module Issuable has_many :notes, as: :noteable, dependent: :destroy has_many :label_links, as: :target, dependent: :destroy has_many :labels, through: :label_links + has_many :todos, as: :target, dependent: :destroy validates :author, presence: true validates :title, presence: true, length: { within: 0..255 } @@ -41,7 +42,7 @@ module Issuable scope :join_project, -> { joins(:project) } scope :references_project, -> { references(:project) } - scope :non_archived, -> { join_project.merge(Project.non_archived.only(:where)) } + scope :non_archived, -> { join_project.where(projects: { archived: false }) } delegate :name, :email, |