Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
a1a94e73
Commit
a1a94e73
authored
Apr 10, 2017
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove an unused `cared` scope from Issue and MergeRequest
parent
add1c188
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
6 deletions
+0
-6
app/models/issue.rb
app/models/issue.rb
+0
-1
app/models/merge_request.rb
app/models/merge_request.rb
+0
-1
app/models/user.rb
app/models/user.rb
+0
-4
No files found.
app/models/issue.rb
View file @
a1a94e73
...
@@ -26,7 +26,6 @@ class Issue < ActiveRecord::Base
...
@@ -26,7 +26,6 @@ class Issue < ActiveRecord::Base
validates
:project
,
presence:
true
validates
:project
,
presence:
true
scope
:cared
,
->
(
user
)
{
where
(
assignee_id:
user
)
}
scope
:in_projects
,
->
(
project_ids
)
{
where
(
project_id:
project_ids
)
}
scope
:in_projects
,
->
(
project_ids
)
{
where
(
project_id:
project_ids
)
}
scope
:without_due_date
,
->
{
where
(
due_date:
nil
)
}
scope
:without_due_date
,
->
{
where
(
due_date:
nil
)
}
...
...
app/models/merge_request.rb
View file @
a1a94e73
...
@@ -104,7 +104,6 @@ class MergeRequest < ActiveRecord::Base
...
@@ -104,7 +104,6 @@ class MergeRequest < ActiveRecord::Base
scope
:by_source_or_target_branch
,
->
(
branch_name
)
do
scope
:by_source_or_target_branch
,
->
(
branch_name
)
do
where
(
"source_branch = :branch OR target_branch = :branch"
,
branch:
branch_name
)
where
(
"source_branch = :branch OR target_branch = :branch"
,
branch:
branch_name
)
end
end
scope
:cared
,
->
(
user
)
{
where
(
'assignee_id = :user OR author_id = :user'
,
user:
user
.
id
)
}
scope
:by_milestone
,
->
(
milestone
)
{
where
(
milestone_id:
milestone
)
}
scope
:by_milestone
,
->
(
milestone
)
{
where
(
milestone_id:
milestone
)
}
scope
:of_projects
,
->
(
ids
)
{
where
(
target_project_id:
ids
)
}
scope
:of_projects
,
->
(
ids
)
{
where
(
target_project_id:
ids
)
}
scope
:from_project
,
->
(
project
)
{
where
(
source_project_id:
project
.
id
)
}
scope
:from_project
,
->
(
project
)
{
where
(
source_project_id:
project
.
id
)
}
...
...
app/models/user.rb
View file @
a1a94e73
...
@@ -587,10 +587,6 @@ class User < ActiveRecord::Base
...
@@ -587,10 +587,6 @@ class User < ActiveRecord::Base
name
.
split
.
first
unless
name
.
blank?
name
.
split
.
first
unless
name
.
blank?
end
end
def
cared_merge_requests
MergeRequest
.
cared
(
self
)
end
def
projects_limit_left
def
projects_limit_left
projects_limit
-
personal_projects
.
count
projects_limit
-
personal_projects
.
count
end
end
...
...
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