BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
1a917bc9
Commit
1a917bc9
authored
Jan 24, 2013
by
Andrey Kumanyaev
Committed by
Dmitriy Zaporozhets
Jan 24, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix scope to empty relation
parent
2befa8fe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
user_team.rb
app/models/user_team.rb
+1
-1
No files found.
app/models/user_team.rb
View file @
1a917bc9
...
@@ -17,7 +17,7 @@ class UserTeam < ActiveRecord::Base
...
@@ -17,7 +17,7 @@ class UserTeam < ActiveRecord::Base
scope
:with_member
,
->
(
user
){
joins
(
:user_team_user_relationships
).
where
(
user_team_user_relationships:
{
user_id:
user
.
id
})
}
scope
:with_member
,
->
(
user
){
joins
(
:user_team_user_relationships
).
where
(
user_team_user_relationships:
{
user_id:
user
.
id
})
}
scope
:with_project
,
->
(
project
){
joins
(
:user_team_project_relationships
).
where
(
user_team_project_relationships:
{
project_id:
project
})}
scope
:with_project
,
->
(
project
){
joins
(
:user_team_project_relationships
).
where
(
user_team_project_relationships:
{
project_id:
project
})}
scope
:without_project
,
->
(
project
){
where
(
"id NOT IN (:ids)"
,
ids:
with_project
(
project
))}
scope
:without_project
,
->
(
project
){
where
(
"id NOT IN (:ids)"
,
ids:
(
a
=
with_project
(
project
);
a
.
blank?
?
0
:
a
))}
scope
:created_by
,
->
(
user
){
where
(
owner_id:
user
)
}
scope
:created_by
,
->
(
user
){
where
(
owner_id:
user
)
}
class
<<
self
class
<<
self
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment