File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,11 +54,12 @@ class ResourceInterface
5454 # relationships, or nil.
5555 # @ return [ Hash]
5656 def as_jsonapi (options = {}); end
57+ end
5758` ` `
5859
5960#### Rendering a single resource
6061` ` ` ruby
61- JSONAPI .render(resource,
62+ JSONAPI .render(data: resource,
6263 include: include_string,
6364 fields: fields_hash,
6465 meta: meta_hash,
@@ -69,7 +70,7 @@ This returns a JSON API compliant hash representing the described document.
6970
7071#### Rendering a collection of resources
7172` ` ` ruby
72- JSONAPI .render(resources,
73+ JSONAPI .render(data: resources,
7374 include: include_string,
7475 fields: fields_hash,
7576 meta: meta_hash,
@@ -81,7 +82,7 @@ This returns a JSON API compliant hash representing the described document.
8182### Rendering errors
8283
8384``` ruby
84- JSONAPI .render_errors(errors,
85+ JSONAPI .render_errors(errors: errors ,
8586 meta: meta_hash,
8687 links: links_hash)
8788```
You can’t perform that action at this time.
0 commit comments