mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 06:16: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. |
||
|---|---|---|
| .. | ||
| association_test.rb | ||
| generators_test.rb | ||
| no_serialization_scope_test.rb | ||
| serialization_test.rb | ||
| serializer_support_test.rb | ||
| serializer_test.rb | ||
| test_helper.rb | ||