Class: ActiveScaffold::Generators::ControllerGenerator

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

Instance Method Summary collapse

Instance Method Details

#create_controller_filesObject



37
38
39
40
# File 'lib/generators/active_scaffold/controller_generator.rb', line 37

def create_controller_files
  template 'controller.rb', File.join('app/controllers', class_path, "#{controller_file_name}_controller.rb")
  template 'helper.rb', File.join('app/helpers', class_path, "#{controller_file_name}_helper.rb")
end

#create_view_root_folderObject



44
45
46
# File 'lib/generators/active_scaffold/controller_generator.rb', line 44

def create_view_root_folder
  empty_directory File.join('app/views', controller_file_path)
end