Class: Haml::Generators::ScaffoldGenerator
- Inherits:
-
Erb::Generators::ScaffoldGenerator
- Object
- Erb::Generators::ScaffoldGenerator
- Haml::Generators::ScaffoldGenerator
- Defined in:
- lib/generators/haml/scaffold/scaffold_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_form_file ⇒ Object
17 18 19 20 21 22 |
# File 'lib/generators/haml/scaffold/scaffold_generator.rb', line 17 def copy_form_file if [:form_builder].nil? filename = filename_with_extensions("_form") template "_form.html.haml", File.join("app/views", controller_file_path, filename) end end |
#copy_view_files ⇒ Object
8 9 10 11 12 13 |
# File 'lib/generators/haml/scaffold/scaffold_generator.rb', line 8 def copy_view_files available_views.each do |view| filename = filename_with_extensions(view) template "#{view}.html.haml", File.join("app/views", controller_file_path, filename) end end |