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
94e68c42
Commit
94e68c42
authored
May 14, 2020
by
Rajendra Kadam
Committed by
Peter Leitzen
May 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move prepend to last line in app models - 2
parent
8b9bc88c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
5 deletions
+11
-5
app/models/group_milestone.rb
app/models/group_milestone.rb
+2
-1
app/models/list.rb
app/models/list.rb
+2
-2
app/models/members_preloader.rb
app/models/members_preloader.rb
+2
-2
changelogs/unreleased/app-models-2.yml
changelogs/unreleased/app-models-2.yml
+5
-0
No files found.
app/models/group_milestone.rb
View file @
94e68c42
# frozen_string_literal: true
# Group Milestones are milestones that can be shared among many projects within the same group
class
GroupMilestone
<
GlobalMilestone
include_if_ee
(
'::EE::GroupMilestone'
)
# rubocop: disable Cop/InjectEnterpriseEditionModule
attr_reader
:group
,
:milestones
def
self
.
build_collection
(
group
,
projects
,
params
)
...
...
@@ -46,3 +45,5 @@ class GroupMilestone < GlobalMilestone
true
end
end
GroupMilestone
.
include_if_ee
(
'::EE::GroupMilestone'
)
app/models/list.rb
View file @
94e68c42
...
...
@@ -3,8 +3,6 @@
class
List
<
ApplicationRecord
include
Importable
prepend_if_ee
(
'::EE::List'
)
# rubocop: disable Cop/InjectEnterpriseEditionModule
belongs_to
:board
belongs_to
:label
has_many
:list_user_preferences
...
...
@@ -104,3 +102,5 @@ class List < ApplicationRecord
throw
(
:abort
)
unless
destroyable?
# rubocop:disable Cop/BanCatchThrow
end
end
List
.
prepend_if_ee
(
'::EE::List'
)
app/models/members_preloader.rb
View file @
94e68c42
# frozen_string_literal: true
class
MembersPreloader
prepend_if_ee
(
'EE::MembersPreloader'
)
# rubocop: disable Cop/InjectEnterpriseEditionModule
attr_reader
:members
def
initialize
(
members
)
...
...
@@ -16,3 +14,5 @@ class MembersPreloader
ActiveRecord
::
Associations
::
Preloader
.
new
.
preload
(
members
.
map
(
&
:user
),
:u2f_registrations
)
end
end
MembersPreloader
.
prepend_if_ee
(
'EE::MembersPreloader'
)
changelogs/unreleased/app-models-2.yml
0 → 100644
View file @
94e68c42
---
title
:
Move prepend to last line in app models
2
merge_request
:
31827
author
:
Rajendra Kadam
type
:
fixed
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