rails-api/active_model_serializers — pull request #500 by krenzke (2014-02-03 18:58:16+00:00)
Title: added ability to assign a lambda to the root for a serializer

Trying to give a little more flexibility to the root name for a serializer. In addition to allowing a true/false or symbol, I've added the ability to use a lambda as the root which will be called with the object to be serialized. Was useful on a project I was working on, might be useful to others as well.