Class: Pompidou::Generators::ScaffoldControllerGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Includes:
Rails::Generators::ResourceHelpers
Defined in:
lib/generators/scaffold_controller/scaffold_controller_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_controller_filesObject



17
18
19
20
21
22
23
24
25
26
# File 'lib/generators/scaffold_controller/scaffold_controller_generator.rb', line 17

def create_controller_files
  template(
    "admin_controller.rb", 
    File.join('app/controllers/admin', controller_class_path, "#{controller_file_name}_controller.rb")
  )
  template(
    "public_controller.rb", 
    File.join('app/controllers/public', controller_class_path, "#{controller_file_name}_controller.rb")
  )
end