Class: Redmine::Generators::ScaffoldGenerator
- Inherits:
-
Rails::Generators::ScaffoldGenerator
- Object
- Rails::Generators::ScaffoldGenerator
- Redmine::Generators::ScaffoldGenerator
- Includes:
- PluginNameAttribute, RemoteableLinks
- Defined in:
- lib/redmine/generators/scaffold_generator.rb
Instance Method Summary collapse
Methods included from PluginNameAttribute
Instance Method Details
#add_js_views ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/redmine/generators/scaffold_generator.rb', line 32 def add_js_views template "_model.html.erb", "app/views/#{plural_table_name}/_#{singular_table_name}.html.erb" return false unless [:remote] %w(_form show new create edit update destroy).each do |view| view_file = "#{view}.js.erb" template view_file, "app/views/#{plural_table_name}/#{view_file}" end end |