Class: Redmine::Generators::ProjectMenuGenerator
- Inherits:
-
Rails::Generators::ModelGenerator
- Object
- Rails::Generators::ModelGenerator
- Redmine::Generators::ProjectMenuGenerator
- Includes:
- PluginNameAttribute
- Defined in:
- lib/redmine/generators/project_menu_generator.rb
Instance Method Summary collapse
Methods included from PluginNameAttribute
Instance Method Details
#add_project_menu ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/redmine/generators/project_menu_generator.rb', line 11 def = %( menu :project_menu, :#{plural_table_name}, {controller: "#{plural_table_name}", action: "index" }, caption: :label_#{singular_table_name}_plural, param: :project_id\n) sentinel = /Redmine::Plugin\.register\s+:\w+\s+do\s?\n/ in_root do inject_into_file "init.rb", , after: sentinel end end |