Class: Haml::Generators::EnquiryControllerGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/haml/enquiry_controller/enquiry_controller_generator.rb

Instance Method Summary collapse

Constructor Details

#initialize(args, *options) ⇒ EnquiryControllerGenerator

Returns a new instance of EnquiryControllerGenerator.



18
19
20
21
# File 'lib/generators/haml/enquiry_controller/enquiry_controller_generator.rb', line 18

def initialize(args, *options)
  super
  parse_filter_attributes!
end

Instance Method Details

#create_template_fileObject



23
24
25
# File 'lib/generators/haml/enquiry_controller/enquiry_controller_generator.rb', line 23

def create_template_file
  template 'index.html.haml', File.join('app/views', class_path, "#{file_name}_enquiry", "#{action_name}.html.haml")
end