Class: Haml::ScaffoldGenerator
- Inherits:
-
Erb::Generators::ScaffoldGenerator
- Object
- Erb::Generators::ScaffoldGenerator
- Haml::ScaffoldGenerator
- Defined in:
- lib/generators/haml/scaffold/scaffold_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_form_file ⇒ Object
16 17 18 19 20 21 |
# File 'lib/generators/haml/scaffold/scaffold_generator.rb', line 16 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
7 8 9 10 11 12 |
# File 'lib/generators/haml/scaffold/scaffold_generator.rb', line 7 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 |