codez/dry_crud — pull request #1 by duritong (2011-11-29 10:26:02+00:00)
Title: Use model_name instead of the name of a model class

Howdie,

I think it would be better to use `class.model_name` insteaed of `model_name` as this makes things more in line with how it is done by rails + it makes things more flexible, especially while using STI.

More detailed description in the commit message:

ActionPack in general uses model_name of a model class to determine
its links. We should also do that in our helpers, so we follow what
Rails does in general.

Also using model_name helps us in generating links for models, that
use STI, but should be available all under the same link. As
described in [1].
Using model_name even let us keep the flexibility to selectively use
different paths for a few subclasses of the main STI-model, by re-
implementing the model_name class.

[1] http://code.alexreisner.com/articles/single-table-inheritance-in-rails.html