Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

preserve capitalization in parent_controller_class_name #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

waynn
Copy link

@waynn waynn commented Mar 27, 2015

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant