active_model_serializers/lib/active_model
twinturbo 486d282922 Raise error when associations cannot be included
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.
2012-07-16 14:18:58 +02:00
..
serializers Prep for 0.5.0 2012-05-16 14:17:10 -07:00
serializer.rb Raise error when associations cannot be included 2012-07-16 14:18:58 +02:00