I am using Rails v2.3.2
I generate a controller by:
script/generate controller cars
It will create many directories and files:
exists app/controllers/
exists app/helpers/
create app/views/cars
create test/functional/
create test/unit/helpers/
create app/controllers/cars_controller.rb
create test/functional/cars_controller_test.rb
create app/helpers/cars_helper.rb
create test/unit/helpers/cars_helper_test.rb
Two questions:
1. How can I revert this command back?(What is the command to revert it back)?
2 What is the command if I only want to generate app/controllers/cars_controller.rb without other files and directories been generated?
Either should work
And if you want to just create a controller file, you might as well create a new file and rename it to cars_controller.rb .