File tree Expand file tree Collapse file tree 1 file changed +19
-19
lines changed Expand file tree Collapse file tree 1 file changed +19
-19
lines changed Original file line number Diff line number Diff line change @@ -35,30 +35,30 @@ Given a JSON API document,
35
35
36
36
```
37
37
document = {
38
- data: {
39
- id: 1,
40
- type: 'post',
41
- attributes: {
42
- title: 'Title 1',
43
- date: '2015-12-20'
38
+ ' data' => {
39
+ 'id' => 1,
40
+ ' type' => 'post',
41
+ ' attributes' => {
42
+ ' title' => 'Title 1',
43
+ ' date' => '2015-12-20'
44
44
},
45
- associations: {
46
- author: {
47
- data: {
48
- type: 'user',
49
- id: 2
45
+ ' associations' => {
46
+ ' author' => {
47
+ ' data' => {
48
+ ' type' => 'user',
49
+ 'id' => '2'
50
50
}
51
51
},
52
- second_author: {
53
- data: nil
52
+ ' second_author' => {
53
+ ' data' => nil
54
54
},
55
- comments: {
56
- data: [{
57
- type: 'comment',
58
- id: 3
55
+ ' comments' => {
56
+ ' data' => [{
57
+ ' type' => 'comment',
58
+ 'id' => '3'
59
59
},{
60
- type: 'comment',
61
- id: 4
60
+ ' type' => 'comment',
61
+ 'id' => '4'
62
62
}]
63
63
}
64
64
}
You can’t perform that action at this time.
0 commit comments