Forum: Ruby on Rails Getting Rid of Accidental Controller

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Mark D. (Guest)
on 2006-01-20 23:13
I accidentally created a controller with the wrong name.  Obviously I
don't want to have this useless controller hanging around - is there a
prescribed way to delete the controller or can I just delete the
controller file?
matthew clark (Guest)
on 2006-01-20 23:22
(Received via mailing list)
from yesterday


not sure what you've done to get what you've got, but the destroy script
will certainly help you clean up properly (i.e: it removes the tests and
helpers and stuff)

e.g:

ruby script/destroy controller article
Joerg D. (Guest)
on 2006-01-20 23:54
Just delete the file. If you use the

ruby script/destroy controller MyController

command though, it will also get rid of your functional tests. And maybe
a helper too and stuff.


Mark D. wrote:
> I accidentally created a controller with the wrong name.  Obviously I
> don't want to have this useless controller hanging around - is there a
> prescribed way to delete the controller or can I just delete the
> controller file?
Mark D. (Guest)
on 2006-01-21 00:27
Thank you.
This topic is locked and can not be replied to.