mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
include! only works when the source serializer has a root set. The as_json method sets up some state for the include! method. If a child association has associations with `:include => true` or `root foo, :include => true` would cause an undefined method error for `NilClass`. This is entirely unhelpful for the end user. This commit raise an error when this situation occurs. It makes it clear that it's not a problem with AMS but the serialization graph. |
||
|---|---|---|
| .. | ||
| action_controller | ||
| active_model | ||
| generators | ||
| active_model_serializers.rb | ||