Skip to content

Commit 0c5259f

Browse files
committed
Bump version and add docs for top-level meta.
1 parent 6dbb114 commit 0c5259f

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,14 @@ JSONAPI::Serializer.serialize(post, base_url: 'http://example.com')
296296

297297
Note: if you override `self_link` in your serializer and leave out `base_url`, it will not be included.
298298

299+
### Top-level metadata
300+
301+
You can pass a `meta` argument to specify top-level metadata:
302+
303+
```ruby
304+
JSONAPI::Serializer.serialize(post, meta: {copyright: 'Copyright 2015 Example Corp.'})
305+
```
306+
299307
## Relationships
300308

301309
You can easily specify relationships with the `has_one` and `has_many` directives.
@@ -510,6 +518,7 @@ end
510518

511519
## Release notes
512520

521+
* v0.3.0: Add top-level `meta` support.
513522
* v0.2.6: Add `base_url` support.
514523
* v0.2.5: Allow disabling ambiguous collection checks for Sequel support.
515524
* v0.2.4: Improve handling for nil relationship links.

lib/jsonapi-serializers/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module JSONAPI
22
module Serializer
3-
VERSION = '0.2.6'
3+
VERSION = '0.3.0'
44
end
55
end

0 commit comments

Comments
 (0)