apotonick/roar-rails — pull request #92 by summera (2014-11-29 19:52:47+00:00)
Title: Collection representer

@apotonick After running into https://github.com/apotonick/roar-rails/issues/77,
I created a CollectionRepresenter to use in my own projects. It makes creating collections really simple.

I updated the [README](https://github.com/summera/roar-rails/blob/f2393a49fe05918d83bf734e2b59b6b24b94f598/README.markdown#collections-with-decorators) with an explanation, but in short:

```ruby
class BandsRepresenter < Roar::Decorator
include Roar::Representer::JSON
include Roar::Representer::Feature::Hypermedia
include Roar::Rails::CollectionRepresenter
end
```

This creates a Bands Collection Representer using the BandRepresenter to serialize each individual resource within the collection.

Let me know what you think!