drapergem/draper — pull request #596 by stevenharman (2014-01-08 22:30:24+00:00)
Title: Bring back compat with ActiveModel::Serializers

The current AMS re-write (which will debut as v0.9.0) has changed how serializers are resolved, and removed the `ArraySerializerSupport` module. This change will ensure Draper properly integrates with both AMS pre-0.9.0, and the future.

I went with the obvious approach, but another option would be to instead test the current loaded version of `active_model_serializers` instead. So, sub out those `if defined?(ActiveModel::ArraySerializerSupport)` checks for something like `Gem.loaded_specs['active_model_serializers'].version.release < Gem::Version.new('0.9')`.

Thoughts?