Class: Haml::Generators::ScaffoldGenerator
- Inherits:
-
Erb::Generators::ScaffoldGenerator
- Object
- Erb::Generators::ScaffoldGenerator
- Haml::Generators::ScaffoldGenerator
- Extended by:
- TemplatePath
- Defined in:
- lib/generators/haml/scaffold/scaffold_generator.rb
Instance Method Summary collapse
Methods included from TemplatePath
Instance Method Details
#copy_form_file ⇒ Object
21 22 23 24 25 26 |
# File 'lib/generators/haml/scaffold/scaffold_generator.rb', line 21 def copy_form_file if [:form_builder].nil? filename = filename_with_extensions("_form") template template_filename_with_extensions("_form"), File.join("app/views", controller_file_path, filename) end end |
#copy_view_files ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/generators/haml/scaffold/scaffold_generator.rb', line 9 def copy_view_files views = available_views views.delete("index") if [:singleton] views.each do |view| filename = filename_with_extensions(view) template template_filename_with_extensions(view), File.join("app/views", controller_file_path, filename) end end |