Class: Rails::Generators::ScaffoldControllerGenerator
- Includes:
- ResourceHelpers
- Defined in:
- lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb
Overview
:nodoc:
Instance Method Summary collapse
Methods included from ResourceHelpers
Methods inherited from NamedBase
Methods inherited from Base
base_root, class_option, default_source_root, desc, hide!, hook_for, inherited, namespace, remove_hook_for, source_root
Methods included from Actions
#add_source, #after_bundle, #capify!, #environment, #gem, #gem_group, #generate, #git, #initialize, #initializer, #lib, #rails_command, #rake, #rakefile, #readme, #route, #vendor
Instance Method Details
#create_controller_files ⇒ Object
18 19 20 21 |
# File 'lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb', line 18 def create_controller_files template_file = .api? ? "api_controller.rb" : "controller.rb" template template_file, File.join("app/controllers", controller_class_path, "#{controller_file_name}_controller.rb") end |