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.
7efed6680ed9ef2ce3b4958318b11b0b?d=identicon&s=25 Mark Daoust (mdaoust)
on 2006-01-20 22: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?
69b2ef4bce76b5b27c94e898976dc6d8?d=identicon&s=25 matthew clark (Guest)
on 2006-01-20 22: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
34791e1d8c4def65f9b93294638a7e04?d=identicon&s=25 Joerg Diekmann (joergd)
on 2006-01-20 22: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 Daoust 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?
7efed6680ed9ef2ce3b4958318b11b0b?d=identicon&s=25 Mark Daoust (mdaoust)
on 2006-01-20 23:27
Thank you.
This topic is locked and can not be replied to.