dhampik / rails-admin-scaffold

Rails generator which allows to scaffold admin controllers, views with proper (non-namespaced) models, helpers, tests and routes
MIT License
92 stars 37 forks source link

preserve capitalization in parent_controller_class_name #16

Open waynn opened 9 years ago

waynn commented 9 years ago

I ran into this just now -- my admin parent controller is actually namespaced, so I passed in --parent_controller=Admin::Base as my argument, but the generated file has class Admin::PlansController < Admin::baseController.

By only capitalizing the first character without changing the rest of the string, it preserves the behavior from before, but also fixes it for my use case, or any case where someone deliberately capitalizes the argument to parent_controller.