Skip to content

Pass array of unique movies to serializer - #363

Closed
sdsd08013 wants to merge 3 commits into
Netflix:devfrom
sdsd08013:pass_array_of_unique_movies
Closed

Pass array of unique movies to serializer#363
sdsd08013 wants to merge 3 commits into
Netflix:devfrom
sdsd08013:pass_array_of_unique_movies

Conversation

@sdsd08013

Copy link
Copy Markdown

According to JSON API document, id should be unique.
https://jsonapi.org/format/#document-resource-objects

id of movie generated by let(:movie) is always same.
https://github.com/Netflix/fast_jsonapi/blob/master/spec/shared/contexts/movie_context.rb#L438

So I replace array passed to serializer [movies, movies] to build_movies(2)

before:

MovieSerializer.new([movie, movie], options)

after:

movies = build_movies(2)
MovieSerializer.new(movies, options)

@@ -1,3 +1,3 @@
module FastJsonapi
VERSION = "1.4"
VERSION = "1.5"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem quite right - possibly a merge issue?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oniofchaos
sorry, I forked from remotes master branch, and push to dev branch.
I recreate pull request, plz check it.
#378

@sdsd08013 sdsd08013 closed this Jan 14, 2019
@sdsd08013
sdsd08013 deleted the pass_array_of_unique_movies branch January 14, 2019 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants