rails-api/active_model_serializers — pull request #480 by stevenharman (2014-01-02 00:26:33+00:00)
Title: Make url_helpers available in serializers

This is built for 0.9, and is a first-pass at getting Rails' `url_helpers` into the serializers. The current approach is a bit tied to Rails, but makes the helpers directly accessible w/in any instance of ActiveModel::Serializer. This also works for associations.

Another idea I had was to expose the helpers via a `urls` method available from serializer instances, rather than mixing the `url_helpers` directly into `ActiveModel::Serializer`. This would at least provide a seam for non-Rails apps to implement their own solution, while still relying on a `Serializer.urls` API.

Thoughts?