summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
authorzenati <zenati@informatique.univ-paris-diderot.fr>2015-06-09 13:28:11 +0200
committerzenati <zenati@informatique.univ-paris-diderot.fr>2015-06-09 13:42:01 +0200
commitb0de6e9ae27a6364819f47d13d827a8aa253c83e (patch)
treea6d647652acd7c6e878cbd246488384f792c251a /app/models/project.rb
parent9562f028594c6d61834d48f75f8379b0de2ba8ae (diff)
downloadgitlab-ce-b0de6e9ae27a6364819f47d13d827a8aa253c83e.tar.gz
An `in_namespace` scope is already present
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 3c9f0dad28b..b161cbe86b9 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -158,7 +158,7 @@ class Project < ActiveRecord::Base
scope :without_user, ->(user) { where('projects.id NOT IN (:ids)', ids: user.authorized_projects.map(&:id) ) }
scope :without_team, ->(team) { team.projects.present? ? where('projects.id NOT IN (:ids)', ids: team.projects.map(&:id)) : scoped }
scope :not_in_group, ->(group) { where('projects.id NOT IN (:ids)', ids: group.project_ids ) }
- scope :in_namespace, ->(namespace) { where(namespace_id: namespace.id) }
+ scope :in_namespace, ->(namespace_ids) { where(namespace_id: namespace_ids) }
scope :in_group_namespace, -> { joins(:group) }
scope :personal, ->(user) { where(namespace_id: user.namespace_id) }
scope :joined, ->(user) { where('namespace_id != ?', user.namespace_id) }