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
0c29aa0d
Commit
0c29aa0d
authored
Jun 10, 2019
by
charlieablett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add `to_json` to `represent` method call
parent
71401814
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
8 deletions
+2
-8
app/controllers/concerns/boards_responses.rb
app/controllers/concerns/boards_responses.rb
+1
-1
changelogs/unreleased/3861-use-serializers-for-project-group-boards.yml
...eleased/3861-use-serializers-for-project-group-boards.yml
+0
-6
spec/controllers/concerns/boards_responses_spec.rb
spec/controllers/concerns/boards_responses_spec.rb
+1
-1
No files found.
app/controllers/concerns/boards_responses.rb
View file @
0c29aa0d
...
...
@@ -69,7 +69,7 @@ module BoardsResponses
end
def
serialize_as_json
(
resource
)
serializer
.
represent
(
resource
).
to
_json
serializer
.
represent
(
resource
).
as
_json
end
def
respond_with
(
resource
)
...
...
changelogs/unreleased/3861-use-serializers-for-project-group-boards.yml
deleted
100644 → 0
View file @
71401814
---
title
:
Refactor Board JSON serialization to use Grape::Entity instead of manual serialization
(to_json)
merge_request
:
author
:
type
:
changed
spec/controllers/concerns/boards_responses_spec.rb
View file @
0c29aa0d
...
...
@@ -17,7 +17,7 @@ describe BoardsResponses do
it
'serializes properly'
do
expected
=
{
"id"
=>
board
.
id
}
expect
(
JSON
.
parse
(
subject
.
serialize_as_json
(
board
)
)).
to
include
(
expected
)
expect
(
subject
.
serialize_as_json
(
board
)).
to
include
(
expected
)
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