rails-api/active_model_serializers — pull request #477 by gtd (2013-12-30 18:45:35+00:00)
Title: Allow serializer#as_json to be called with nil

This is the form that ActiveSupport 3.1 Object#to_json invokes as reported in #457.

Here's a greenfield 3.1.12 app with a minimal test demonstrating the problem: https://github.com/gtd/active_model_serializer_fail/commits/master

I don't think master supports Rails 3.1 anymore, but I'll have a look if there is still a failure path on the rewritten master.