mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Fix bug displaying nil for relationship link href
When using the relationship link with a block, calling "meta" without "href", e.g.
has_one :bio do
link :related do
meta id: 1
end
end
results in in a nil "href", e.g.
{ links: { posts: { related: { href: nil, meta: { id: 1 } } } } }.
According to JSONAPI, we should be able to use meta without href
(http://jsonapi.org/format/#document-links).
This commit is contained in:
@@ -14,6 +14,8 @@ Features:
|
||||
- [#1340](https://github.com/rails-api/active_model_serializers/pull/1340) Add support for resource-level meta. (@beauby)
|
||||
|
||||
Fixes:
|
||||
- [#1516](https://github.com/rails-api/active_model_serializers/pull/1501) No longer return a nil href when only
|
||||
adding meta to a relationship link. (@groyoh)
|
||||
- [#1458](https://github.com/rails-api/active_model_serializers/pull/1458) Preserve the serializer
|
||||
type when fragment caching. (@bdmac)
|
||||
- [#1477](https://github.com/rails-api/active_model_serializers/pull/1477) Fix `fragment_cached?`
|
||||
|
||||
Reference in New Issue
Block a user