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
d02d3224
Commit
d02d3224
authored
Nov 20, 2019
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename `preload_associations` method
This conflicts with an ActiveRecord method in Rails 6
parent
ce328f94
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
app/controllers/boards/lists_controller.rb
app/controllers/boards/lists_controller.rb
+1
-1
app/models/concerns/milestoneish.rb
app/models/concerns/milestoneish.rb
+1
-1
app/models/issue.rb
app/models/issue.rb
+1
-1
app/models/list.rb
app/models/list.rb
+1
-1
app/services/boards/lists/list_service.rb
app/services/boards/lists/list_service.rb
+1
-1
No files found.
app/controllers/boards/lists_controller.rb
View file @
d02d3224
...
...
@@ -53,7 +53,7 @@ module Boards
service
=
Boards
::
Lists
::
GenerateService
.
new
(
board_parent
,
current_user
)
if
service
.
execute
(
board
)
lists
=
board
.
lists
.
movable
.
preload_associat
ion
s
lists
=
board
.
lists
.
movable
.
preload_associat
ed_model
s
List
.
preload_preferences_for_user
(
lists
,
current_user
)
...
...
app/models/concerns/milestoneish.rb
View file @
d02d3224
...
...
@@ -53,7 +53,7 @@ module Milestoneish
end
def
sorted_issues
(
user
)
issues_visible_to_user
(
user
).
preload_associat
ion
s
.
sort_by_attribute
(
'label_priority'
)
issues_visible_to_user
(
user
).
preload_associat
ed_model
s
.
sort_by_attribute
(
'label_priority'
)
end
def
sorted_merge_requests
(
user
)
...
...
app/models/issue.rb
View file @
d02d3224
...
...
@@ -60,7 +60,7 @@ class Issue < ApplicationRecord
scope
:order_closest_future_date
,
->
{
reorder
(
Arel
.
sql
(
'CASE WHEN issues.due_date >= CURRENT_DATE THEN 0 ELSE 1 END ASC, ABS(CURRENT_DATE - issues.due_date) ASC'
))
}
scope
:order_relative_position_asc
,
->
{
reorder
(
::
Gitlab
::
Database
.
nulls_last_order
(
'relative_position'
,
'ASC'
))
}
scope
:preload_associat
ion
s
,
->
{
preload
(
:labels
,
project: :namespace
)
}
scope
:preload_associat
ed_model
s
,
->
{
preload
(
:labels
,
project: :namespace
)
}
scope
:with_api_entity_associations
,
->
{
preload
(
:timelogs
,
:assignees
,
:author
,
:notes
,
:labels
,
project:
[
:route
,
{
namespace: :route
}]
)
}
scope
:public_only
,
->
{
where
(
confidential:
false
)
}
...
...
app/models/list.rb
View file @
d02d3224
...
...
@@ -21,7 +21,7 @@ class List < ApplicationRecord
scope
:destroyable
,
->
{
where
(
list_type:
list_types
.
slice
(
*
destroyable_types
).
values
)
}
scope
:movable
,
->
{
where
(
list_type:
list_types
.
slice
(
*
movable_types
).
values
)
}
scope
:preload_associat
ion
s
,
->
{
preload
(
:board
,
label: :priorities
)
}
scope
:preload_associat
ed_model
s
,
->
{
preload
(
:board
,
label: :priorities
)
}
scope
:ordered
,
->
{
order
(
:list_type
,
:position
)
}
...
...
app/services/boards/lists/list_service.rb
View file @
d02d3224
...
...
@@ -6,7 +6,7 @@ module Boards
def
execute
(
board
)
board
.
lists
.
create
(
list_type: :backlog
)
unless
board
.
lists
.
backlog
.
exists?
board
.
lists
.
preload_associat
ion
s
board
.
lists
.
preload_associat
ed_model
s
end
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