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
Jérome Perrin
gitlab-ce
Commits
23af161b
Commit
23af161b
authored
Oct 05, 2017
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename parameters to params
parent
b3acd545
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
app/serializers/base_serializer.rb
app/serializers/base_serializer.rb
+4
-4
app/serializers/group_child_serializer.rb
app/serializers/group_child_serializer.rb
+1
-1
No files found.
app/serializers/base_serializer.rb
View file @
23af161b
class
BaseSerializer
class
BaseSerializer
attr_reader
:param
eter
s
attr_reader
:params
def
initialize
(
param
eter
s
=
{})
def
initialize
(
params
=
{})
@param
eters
=
parameter
s
@param
s
=
param
s
@request
=
EntityRequest
.
new
(
param
eter
s
)
@request
=
EntityRequest
.
new
(
params
)
end
end
def
represent
(
resource
,
opts
=
{},
entity_class
=
nil
)
def
represent
(
resource
,
opts
=
{},
entity_class
=
nil
)
...
...
app/serializers/group_child_serializer.rb
View file @
23af161b
...
@@ -33,7 +33,7 @@ class GroupChildSerializer < BaseSerializer
...
@@ -33,7 +33,7 @@ class GroupChildSerializer < BaseSerializer
end
end
def
represent_hierarchy
(
hierarchy
,
opts
)
def
represent_hierarchy
(
hierarchy
,
opts
)
serializer
=
self
.
class
.
new
(
param
eter
s
)
serializer
=
self
.
class
.
new
(
params
)
if
hierarchy
.
is_a?
(
Hash
)
if
hierarchy
.
is_a?
(
Hash
)
hierarchy
.
map
do
|
parent
,
children
|
hierarchy
.
map
do
|
parent
,
children
|
...
...
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