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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
38a108ca
Commit
38a108ca
authored
Mar 30, 2017
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a few N+1 queries identified by Bullet
See !10263
parent
9fc17f6f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
1 deletion
+4
-1
app/controllers/admin/abuse_reports_controller.rb
app/controllers/admin/abuse_reports_controller.rb
+1
-0
app/controllers/groups/group_members_controller.rb
app/controllers/groups/group_members_controller.rb
+1
-0
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+1
-0
app/controllers/projects/milestones_controller.rb
app/controllers/projects/milestones_controller.rb
+1
-1
No files found.
app/controllers/admin/abuse_reports_controller.rb
View file @
38a108ca
class
Admin::AbuseReportsController
<
Admin
::
ApplicationController
class
Admin::AbuseReportsController
<
Admin
::
ApplicationController
def
index
def
index
@abuse_reports
=
AbuseReport
.
order
(
id: :desc
).
page
(
params
[
:page
])
@abuse_reports
=
AbuseReport
.
order
(
id: :desc
).
page
(
params
[
:page
])
@abuse_reports
.
includes
(
:reporter
,
:user
)
end
end
def
destroy
def
destroy
...
...
app/controllers/groups/group_members_controller.rb
View file @
38a108ca
...
@@ -14,6 +14,7 @@ class Groups::GroupMembersController < Groups::ApplicationController
...
@@ -14,6 +14,7 @@ class Groups::GroupMembersController < Groups::ApplicationController
@members
=
@members
.
search
(
params
[
:search
])
if
params
[
:search
].
present?
@members
=
@members
.
search
(
params
[
:search
])
if
params
[
:search
].
present?
@members
=
@members
.
sort
(
@sort
)
@members
=
@members
.
sort
(
@sort
)
@members
=
@members
.
page
(
params
[
:page
]).
per
(
50
)
@members
=
@members
.
page
(
params
[
:page
]).
per
(
50
)
@members
.
includes
(
:user
)
@requesters
=
AccessRequestsFinder
.
new
(
@group
).
execute
(
current_user
)
@requesters
=
AccessRequestsFinder
.
new
(
@group
).
execute
(
current_user
)
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
38a108ca
...
@@ -39,6 +39,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
...
@@ -39,6 +39,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@collection_type
=
"MergeRequest"
@collection_type
=
"MergeRequest"
@merge_requests
=
merge_requests_collection
@merge_requests
=
merge_requests_collection
@merge_requests
=
@merge_requests
.
page
(
params
[
:page
])
@merge_requests
=
@merge_requests
.
page
(
params
[
:page
])
@merge_requests
=
@merge_requests
.
includes
(
merge_request_diff: :merge_request
)
@issuable_meta_data
=
issuable_meta_data
(
@merge_requests
,
@collection_type
)
@issuable_meta_data
=
issuable_meta_data
(
@merge_requests
,
@collection_type
)
if
@merge_requests
.
out_of_range?
&&
@merge_requests
.
total_pages
!=
0
if
@merge_requests
.
out_of_range?
&&
@merge_requests
.
total_pages
!=
0
...
...
app/controllers/projects/milestones_controller.rb
View file @
38a108ca
...
@@ -21,9 +21,9 @@ class Projects::MilestonesController < Projects::ApplicationController
...
@@ -21,9 +21,9 @@ class Projects::MilestonesController < Projects::ApplicationController
@sort
=
params
[
:sort
]
||
'due_date_asc'
@sort
=
params
[
:sort
]
||
'due_date_asc'
@milestones
=
@milestones
.
sort
(
@sort
)
@milestones
=
@milestones
.
sort
(
@sort
)
@milestones
=
@milestones
.
includes
(
:project
)
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
do
format
.
html
do
@milestones
=
@milestones
.
includes
(
:project
)
@milestones
=
@milestones
.
page
(
params
[
:page
])
@milestones
=
@milestones
.
page
(
params
[
:page
])
end
end
format
.
json
do
format
.
json
do
...
...
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