drapergem/draper — pull request #555 by azul (2013-06-11 05:53:52+00:00)
Title: Allow creation of collection decorator with --collection option

This allows relying on the existance of a collection decorator in your index view template.

Also respects --collection_parent option for the parent class for the collection decorator.
It will use CollectionDecorator as the parent if available and fall back to Draper::CollectionDecorator.

Including specs for the new generator functionality.

There's quite a bit of code duplication for the inheritance. This shows up in the generator code as well as in the spec.

I decided not to refactor this as it seems more clear to me this way.

Still Missing:
* tests for the generated collection decorator
* documentation for the new options in the readme