active_model_serializers icon indicating copy to clipboard operation
active_model_serializers copied to clipboard

Use string keys in example for Deserialization

Open wasabigeek opened this issue 5 years ago • 4 comments

fixes #2384

wasabigeek avatar Jun 29 '20 14:06 wasabigeek

great! could you also include the following changes:

@@ -59,6 +59,7 @@ module ActiveModelSerializers
         #     # {
         #     #   title: 'Title 1',
         #     #   date: '2015-12-20',
+        #     #   id: 1,
         #     #   author_id: 2,
         #     #   second_author_id: nil
         #     #   comment_ids: [3, 4]

on line 62, and

@@ -70,8 +71,8 @@ module ActiveModelSerializers
         #     # {
         #     #   title: 'Title 1',
         #     #   published_at: '2015-12-20',
-        #     #   author_id: '2',
-        #     #   author_type: 'people'
+        #     #   author_id: 2,
+        #     #   author_type: 'User'
         #     # }
         #
         def parse!(document, options = {})

on lines 73/74

wasifhossain avatar Jun 29 '20 15:06 wasifhossain

Done! Noob question, how did you paste the diffs? And should I be worried about the Appveyor failures?

wasabigeek avatar Jun 29 '20 15:06 wasabigeek

how did you paste the diffs?

opening 3 backticks are followed by diff :)

And should I be worried about the Appveyor failures?

NO for any of the current failures (travis/appveyor), as we still have some other CI issues to resolve

wasifhossain avatar Jun 29 '20 15:06 wasifhossain

Fancy, didn’t know the diff coloration came built in. Ok great, let me know if there’s anything else i should change here :)

wasabigeek avatar Jun 30 '20 15:06 wasabigeek