jrhe/grape-active_model_serializers — pull request #4 by johnallen3d (2013-05-17 00:19:24+00:00)
Title: Support for namespace options and rely more on active_model_serializers

We building an API with Grape and active_model_serializers and were had some additional features we wanted to support so we thought we'd submit them to you as a Pull Request. Feel free to pull them in or reject if this is not the direction you were going in.

The changes involved are:

1) Allowing serializer settings to be provided at the namespace level:

```ruby
namespace 'user', :serializer => :bar do
get "/" do
end

get "/:id" do
end
end
```

2) Hook into `ActiveModel::Serializer.build_json` (what is used by default in `ActionController`).

3) Extend `Grape::Endpoint` to respond to methods that are being relied on in `build_json`. I think this could be extended to support some default options and other features.

4) Removes some unnecessary file and dependencies.