rails-api/active_model_serializers — pull request #750 by dontfidget (2014-12-07 22:22:32+00:00)
Title: pass serializable_options to associations

@RobinDaugherty had committed some changes included in 0.9.1 to forward options passed to `as_json` to serialize_object, bringing back the behavior from 0.8. I definitely welcomed these changes, as I had been stuffing options into `scope` to get around this, but these options, however, are still not available to associations. I believe they should be passed to serialize_object for associations and these changes do just that.

I was afraid of breaking stuff so the code goes out of it's way continue to support serialize_object methods that cannot accept options.

I've included some tests and some helpers as well to help create serializer classes so that I don't need to define all my serializers in the poro file.