Class: Rails::Generators::ScaffoldControllerGenerator

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

Overview

:nodoc:

Instance Method Summary collapse

Methods included from ResourceHelpers

included, #initialize

Instance Method Details

#create_controller_filesObject



22
23
24
25
# File 'railties/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb', line 22

def create_controller_files
  template_file = options.api? ? "api_controller.rb" : "controller.rb"
  template template_file, File.join("app/controllers", controller_class_path, "#{controller_file_name}_controller.rb")
end