rails-api/active_model_serializers — pull request #481 by stevenharman (2014-01-02 23:42:28+00:00)
Title: Make a url generator available in serializers

This is built for 0.9, as an alternative to #480, and is an attempt to allow generation of URLS within serializers. This makes a `url_generator` (aliased as `urls`) object available from within any instance of ActiveModel::Serializer, and any associated serializers.

In a Rails app, we will automatically inject an instance of `ActiveModel::Serializer::UrlGenerator` when building a serializer from the `ActionController`. The same seam can be used to inject a url generator/helper in non-Rails apps.