# Ungenerate / remove scaffold command?

**URL:** <https://www.ruby-forum.com/t/ungenerate-remove-scaffold-command/53521>\
**Category:** Rails\
**Created:** [February 8, 2006, 8:44am UTC](https://www.ruby-forum.com/t/ungenerate-remove-scaffold-command/53521 "2006-02-08T08:44:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aftershock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Post date:** [February 8, 2006, 8:44am UTC](https://www.ruby-forum.com/t/ungenerate-remove-scaffold-command/53521/1 "2006-02-08T08:44:18Z")

</div>

I have seen this somewhere and can’t find it now. Is there an ungenerate  
or remove command for the scaffold generator. It would be easier than  
removing all the files by hand.

I have tried ./script/ungenerate but no luck.

Thanks

---

<div class="post-metadata">

**Author:** ![aftershock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Post date:** [February 8, 2006, 8:59am UTC](https://www.ruby-forum.com/t/ungenerate-remove-scaffold-command/53521/2 "2006-02-08T08:59:20Z")

</div>

James W. wrote:

> I have seen this somewhere and can’t find it now. Is there an ungenerate  
> or remove command for the scaffold generator. It would be easier than  
> removing all the files by hand.  
> …

Furthermore, I need help renaming a controller and associated  
scaffolding, model, etc…

- I guess this is why you should plan suff before hand 😉  
My problem is that I was just dabbling with rails and within a month I  
had a new intranet system!

---

<div class="post-metadata">

**Author:** ![aftershock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Post date:** [February 8, 2006, 9:02am UTC](https://www.ruby-forum.com/t/ungenerate-remove-scaffold-command/53521/3 "2006-02-08T09:02:26Z")

</div>

script/destroy scaffold …

---

<div class="post-metadata">

**Author:** ![aftershock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Post date:** [February 8, 2006, 9:17am UTC](https://www.ruby-forum.com/t/ungenerate-remove-scaffold-command/53521/4 "2006-02-08T09:17:50Z")

</div>

In the past when I’ve had to rename controller/model/etc., I’ve just  
moved files around, renamed classes by hand, etc. I figure doing that  
is fair punishment for not planning properly beforehand, and it gives  
me an incentive to do things better next time…

No idea if there’s a simpler way to do it or not; kind of doubt it,  
since you could have made all sorts of changes to the insides of a  
controller, and how would a script track all the dependencies that  
you’ve introduced?

Regards

Dave M.
