mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
For JSONAPI, `include_data` currently means, "should we populate the 'data'" key for this relationship. Current options are true/false. This adds the `:if_sideloaded` option. This means "only populate the 'data' key when we are sideloading this relationship." This is because 'data' is often only relevant to sideloading, and causes a database hit. Addresses https://github.com/rails-api/active_model_serializers/issues/1555 |
||
|---|---|---|
| .. | ||
| serializer | ||
| serializable_resource.rb | ||
| serializer.rb | ||