Balancing On Rails

August 01, 2007

Removing a controller

Rails does a lot of automation to generate controllers etc. For an example if you are creating a controller, all you need to do is:

ruby script/generate controller some

This would generate a lot of things like

  • creates a director called some under views
  • creates a file called some_controller.rb under app/controllers directory.
  • creates a file called some_controller_test.rb test/functional directory.
  • creates a file called admin_helper.rb under app/helpers directory.

All this is fine. But let's say I created this controller and later I don't want this controller. I want to remove it. How do I remove it? Is there a automation command that would go through and remove the files for me?

Technorati tags: , ,

14 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home