Skip to content

Commit d10b2a7

Browse files
authored
Pr ch06 json worth a thousand words (#63)
* Change JSON to have same user id for relationships and include * Add missing end quote for `include`
1 parent e443853 commit d10b2a7

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

rails6/en/chapter06-improve-json.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ The problem with this approach is we have to duplicate the `User' objects for ea
392392
----
393393

394394

395-
=== Incorporate the relationships into `include
395+
=== Incorporate the relationships into `include`
396396

397397
The third solution (chosen by the JSON:API) is a mixture of the first two.
398398

@@ -415,7 +415,7 @@ A JSON is worth a thousand words:
415415
},
416416
"relationships": {
417417
"user": {
418-
"id": 1,
418+
"id": 2,
419419
"type": "user"
420420
}
421421
}
@@ -430,7 +430,7 @@ A JSON is worth a thousand words:
430430
},
431431
"relationships": {
432432
"user": {
433-
"id": 1,
433+
"id": 2,
434434
"type": "user"
435435
}
436436
}

rails6/es/chapter06-improve-json.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ El problema con este enfoque es que tenemos duplicados del objeto `User' para ca
393393
----
394394

395395

396-
=== Incorporar las relaciones incluidas en `include
396+
=== Incorporar las relaciones incluidas en `include`
397397

398398
LA tercer solución (elegida por JSON:API) es una combinación de las primeras dos.
399399

@@ -416,7 +416,7 @@ Un JSON vale mas que mil palabras:
416416
},
417417
"relationships": {
418418
"user": {
419-
"id": 1,
419+
"id": 2,
420420
"type": "user"
421421
}
422422
}
@@ -431,7 +431,7 @@ Un JSON vale mas que mil palabras:
431431
},
432432
"relationships": {
433433
"user": {
434-
"id": 1,
434+
"id": 2,
435435
"type": "user"
436436
}
437437
}

rails6/fr/chapter06-improve-json.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ Un JSON vaut mille mots:
419419
},
420420
"relationships": {
421421
"user": {
422-
"id": 1,
422+
"id": 2,
423423
"type": "user"
424424
}
425425
}
@@ -434,7 +434,7 @@ Un JSON vaut mille mots:
434434
},
435435
"relationships": {
436436
"user": {
437-
"id": 1,
437+
"id": 2,
438438
"type": "user"
439439
}
440440
}

0 commit comments

Comments
 (0)