Defect #28668 ยป redmine_plugin_controller_generates_snakecase_filename.diff
lib/generators/redmine_plugin_controller/redmine_plugin_controller_generator.rb (working copy) | ||
---|---|---|
14 | 14 |
end |
15 | 15 | |
16 | 16 |
def copy_templates |
17 |
template 'controller.rb.erb', "#{plugin_path}/app/controllers/#{controller}_controller.rb" |
|
18 |
template 'helper.rb.erb', "#{plugin_path}/app/helpers/#{controller}_helper.rb" |
|
19 |
template 'functional_test.rb.erb', "#{plugin_path}/test/functional/#{controller}_controller_test.rb" |
|
17 |
template 'controller.rb.erb', "#{plugin_path}/app/controllers/#{controller.underscore}_controller.rb"
|
|
18 |
template 'helper.rb.erb', "#{plugin_path}/app/helpers/#{controller.underscore}_helper.rb"
|
|
19 |
template 'functional_test.rb.erb', "#{plugin_path}/test/functional/#{controller.underscore}_controller_test.rb"
|
|
20 | 20 |
# View template for each action. |
21 | 21 |
actions.each do |action| |
22 |
path = "#{plugin_path}/app/views/#{controller}/#{action}.html.erb" |
|
22 |
path = "#{plugin_path}/app/views/#{controller.underscore}/#{action}.html.erb"
|
|
23 | 23 |
@action_name = action |
24 | 24 |
template 'view.html.erb', path |
25 | 25 |
end |