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
Tatuya Kamada
gitlab-ce
Commits
f4a84f50
Commit
f4a84f50
authored
Sep 27, 2016
by
Paco Guzman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid database queries on Banzai::ReferenceParser::BaseParser for nodes without references
parent
684baf7e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
CHANGELOG
CHANGELOG
+1
-0
lib/banzai/reference_parser/base_parser.rb
lib/banzai/reference_parser/base_parser.rb
+5
-1
No files found.
CHANGELOG
View file @
f4a84f50
...
@@ -5,6 +5,7 @@ v 8.13.0 (unreleased)
...
@@ -5,6 +5,7 @@ v 8.13.0 (unreleased)
- Speed-up group milestones show page
- Speed-up group milestones show page
- Log LDAP lookup errors and don't swallow unrelated exceptions. !6103 (Markus Koller)
- Log LDAP lookup errors and don't swallow unrelated exceptions. !6103 (Markus Koller)
- Add more tests for calendar contribution (ClemMakesApps)
- Add more tests for calendar contribution (ClemMakesApps)
- Avoid database queries on Banzai::ReferenceParser::BaseParser for nodes without references
- Fix robots.txt disallowing access to groups starting with "s" (Matt Harrison)
- Fix robots.txt disallowing access to groups starting with "s" (Matt Harrison)
- Only update issuable labels if they have been changed
- Only update issuable labels if they have been changed
- Revoke button in Applications Settings underlines on hover.
- Revoke button in Applications Settings underlines on hover.
...
...
lib/banzai/reference_parser/base_parser.rb
View file @
f4a84f50
...
@@ -79,8 +79,12 @@ module Banzai
...
@@ -79,8 +79,12 @@ module Banzai
def
referenced_by
(
nodes
)
def
referenced_by
(
nodes
)
ids
=
unique_attribute_values
(
nodes
,
self
.
class
.
data_attribute
)
ids
=
unique_attribute_values
(
nodes
,
self
.
class
.
data_attribute
)
if
ids
.
empty?
references_relation
.
none
else
references_relation
.
where
(
id:
ids
)
references_relation
.
where
(
id:
ids
)
end
end
end
# Returns the ActiveRecord::Relation to use for querying references in the
# Returns the ActiveRecord::Relation to use for querying references in the
# DB.
# DB.
...
...
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