drapergem/draper — pull request #589 by fancyremarker (2013-12-02 23:45:24+00:00)
Title: Decorators generated via controller generator hooks have singular names

Previously, decorators generated via:

rails g decorator model

would be named `ModelGenerator`, whereas decorators generated via:

rails g controller models
rails g resource model

would be named `ModelsGenerator`, even though all cases generated model decorators, not controller decorators. This discrepancy broke the default class lookup for `@model.decorate`, and so this pull request unifies the behavior of all generators to create decorators named in the singular.

I'm sure there's a better implementation here, and I'm happy to do that; just let me know what's best!