Netflix / fast_jsonapi

No Longer Maintained - A lightning fast JSON:API serializer for Ruby Objects.
Apache License 2.0
5.07k stars 425 forks source link

Check #each instead of #size for is_collection? #460

Closed marksiemers closed 4 years ago

marksiemers commented 4 years ago

See if a resource responds to 'each' instead of 'size' as things other than collections can respond to 'size' (e.g. File instance)

marksiemers commented 4 years ago

Should address this issue: https://github.com/Netflix/fast_jsonapi/issues/459