seyhunak/twitter-bootstrap-rails — pull request #128 by glanotte (2012-03-02 04:13:21+00:00)
Title: Support for namespaced models in theme generator

Adding support for name-spaced models, such as `Admin::User` within the theme generator.

I changed from `Kernel.get_const` to `constantize` from ActiveSupport, this has support for parsing modules. Using `get_const` on `Admin::User` results in an error.

I also added `demodulize` to the `resource_name` before underscoring, to prevent instance variables being created that come out like `@admin/user`.

There were additional changes within the edit, new and _form templates to reference `resource_name` instead of `model_name.underscore` to prevent the same issue as above.

This is my first pull request, so let me know if there is anything else that I should provide.