Class: Erb::Generators::ScaffoldGenerator
- Inherits:
-
Object
- Object
- Erb::Generators::ScaffoldGenerator
- Defined in:
- lib/generators/scaffold_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_view_files ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/generators/scaffold_generator.rb', line 7 def copy_view_files available_views = [ 'index.html', '_index_thead.html', '_index_tbody.html', '_form.html', '_new_form.html', '_edit_form.html', '_filter_form.html', '_show_table.html' ] available_views.each do |view| filename = [view, handler].compact.join('.') template filename, File.join('app/views', controller_file_path, filename) end end |