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
iv
gitlab-ce
Commits
8237da0d
Commit
8237da0d
authored
Oct 14, 2015
by
Yorick Peterse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eager load note projects when viewing issues
parent
d4832b03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
app/models/note.rb
app/models/note.rb
+4
-1
No files found.
app/models/note.rb
View file @
8237da0d
...
@@ -59,7 +59,10 @@ class Note < ActiveRecord::Base
...
@@ -59,7 +59,10 @@ class Note < ActiveRecord::Base
scope
:fresh
,
->
{
order
(
created_at: :asc
,
id: :asc
)
}
scope
:fresh
,
->
{
order
(
created_at: :asc
,
id: :asc
)
}
scope
:inc_author_project
,
->
{
includes
(
:project
,
:author
)
}
scope
:inc_author_project
,
->
{
includes
(
:project
,
:author
)
}
scope
:inc_author
,
->
{
includes
(
:author
)
}
scope
:inc_author
,
->
{
includes
(
:author
)
}
scope
:inc_associations
,
->
{
includes
(
:author
,
:noteable
,
:updated_by
)
}
scope
:inc_associations
,
->
do
includes
(
:author
,
:noteable
,
:updated_by
,
:project
)
end
serialize
:st_diff
serialize
:st_diff
before_create
:set_diff
,
if:
->
(
n
)
{
n
.
line_code
.
present?
}
before_create
:set_diff
,
if:
->
(
n
)
{
n
.
line_code
.
present?
}
...
...
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