rails-api/active_model_serializers — pull request #223 by tchak (2013-03-07 10:41:53+00:00)
Title: use `read_attribute_for_serialization` to serialize ids

* in order to allow some optimisation in simple cases, we include two hooks `read_association_id_for_serialization` and `read_association_ids_for_serialization`

This is an alternative to #221 with hooks to allow for optimized AR calls. The default is still to use `read_attribute_for_serialization` all the time to ensure the default less surprising behavior.