Class: ScaffoldController::Generators::ScaffoldControllerGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- ScaffoldController::Generators::ScaffoldControllerGenerator
- Includes:
- Rails::Generators::ResourceHelpers
- Defined in:
- lib/generators/scaffold_controller/scaffold_controller_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_controller_files ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/generators/scaffold_controller/scaffold_controller_generator.rb', line 21 def create_controller_files if [:singleton] template 'singleton_controller.rb', File.join('app/controllers', class_path, "#{controller_file_name}_controller.rb") else template 'controller.rb', File.join('app/controllers', class_path, "#{controller_file_name}_controller.rb") end end |