Defect #28668
Updated by Go MAEDA over 6 years ago
redmine_plugin_controller generates not snake case file name but camel case file name when specifying controller name as camel case. For example: <pre> $ bundle exec rails generate redmine_plugin_controller redmine_plugin_contro ller hello_message FooBars create plugins/hello_message/app/controllers/FooBars_controller.rb create plugins/hello_message/app/helpers/FooBars_helper.rb create plugins/hello_message/test/functional/FooBars_controller_test.rb </pre> This causes On the other hand, redmine_plugin_model generates snake case file name when specifying model name as camel case. <pre> $ bundle exec rails generate redmine_plugin_model hello_message FooBar create plugins/hello_message/app/models/foo_bar.rb create plugins/hello_message/test/unit/foo_bar_test.rb create plugins/hello_message/db/migrate/004_create_foo_bars.rb </pre> Ruby on Rails' @rails generate controller FooBars@ command generates snake case file name: 'foo_bars_controller.rb', too. Environment is as follows <pre> Environment: Redmine version 3.4.5.stable.17297 Ruby version 2.4.3-p205 (2017-12-14) [x86_64-linux] Rails version 4.2.8 Environment production Database adapter SQLite </pre> * trunk has same behavior. I expect to generate controller file with snake case name even if controller name is specified by camel case, like model file name.