Class: Haml::Generators::ControllerGenerator
- Inherits:
-
Base
- Object
- Rails::Generators::NamedBase
- Base
- Haml::Generators::ControllerGenerator
- Defined in:
- lib/generators/haml_rails/templates/controller/controller_generator.rb
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#create_view_files ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/generators/haml_rails/templates/controller/controller_generator.rb', line 8 def create_view_files base_path = File.join("app/views", class_path, file_name) empty_directory base_path actions.each do |action| @action = action @path = File.join(base_path, "#{action}.html.haml") template 'view.html.haml', @path end end |