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
dcbd090c
Commit
dcbd090c
authored
Apr 03, 2017
by
Robert Speicher
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-nplusone-queries' into 'master'
Fix a few N+1 queries identified by Bullet See merge request !10361
parents
feb3f306
38a108ca
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
1 deletion
+4
-1
abuse_reports_controller.rb
app/controllers/admin/abuse_reports_controller.rb
+1
-0
group_members_controller.rb
app/controllers/groups/group_members_controller.rb
+1
-0
merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+1
-0
milestones_controller.rb
app/controllers/projects/milestones_controller.rb
+1
-1
No files found.
app/controllers/admin/abuse_reports_controller.rb
View file @
dcbd090c
class
Admin
::
AbuseReportsController
<
Admin
::
ApplicationController
def
index
@abuse_reports
=
AbuseReport
.
order
(
id: :desc
).
page
(
params
[
:page
])
@abuse_reports
.
includes
(
:reporter
,
:user
)
end
def
destroy
...
...
app/controllers/groups/group_members_controller.rb
View file @
dcbd090c
...
...
@@ -14,6 +14,7 @@ class Groups::GroupMembersController < Groups::ApplicationController
@members
=
@members
.
search
(
params
[
:search
])
if
params
[
:search
].
present?
@members
=
@members
.
sort
(
@sort
)
@members
=
@members
.
page
(
params
[
:page
]).
per
(
50
)
@members
.
includes
(
:user
)
@requesters
=
AccessRequestsFinder
.
new
(
@group
).
execute
(
current_user
)
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
dcbd090c
...
...
@@ -39,6 +39,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@collection_type
=
"MergeRequest"
@merge_requests
=
merge_requests_collection
@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
)
if
@merge_requests
.
out_of_range?
&&
@merge_requests
.
total_pages
!=
0
...
...
app/controllers/projects/milestones_controller.rb
View file @
dcbd090c
...
...
@@ -21,9 +21,9 @@ class Projects::MilestonesController < Projects::ApplicationController
@sort
=
params
[
:sort
]
||
'due_date_asc'
@milestones
=
@milestones
.
sort
(
@sort
)
@milestones
=
@milestones
.
includes
(
:project
)
respond_to
do
|
format
|
format
.
html
do
@milestones
=
@milestones
.
includes
(
:project
)
@milestones
=
@milestones
.
page
(
params
[
:page
])
end
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