Class: WheelsControllerGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/wheels_controller/wheels_controller_generator.rb

Instance Method Summary collapse

Instance Method Details

#install_fileObject



6
7
8
9
10
11
12
# File 'lib/generators/wheels_controller/wheels_controller_generator.rb', line 6

def install_file
  if class_name == "All"
    directory "app/controllers", "app/controllers"
  else
    file "app/controllers/#{plural_name}_controller.rb", "app/controllers/#{plural_name}_controller.rb"
  end
end