# Rails: generate scaffold Product Admin overwrites admin page

**URL:** <https://www.ruby-forum.com/t/rails-generate-scaffold-product-admin-overwrites-admin-page/68828>\
**Category:** Ruby\
**Created:** [September 15, 2006, 7:27pm UTC](https://www.ruby-forum.com/t/rails-generate-scaffold-product-admin-overwrites-admin-page/68828 "2006-09-15T19:27:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phlip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed8c4c/32.png) [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Post date:** [September 15, 2006, 7:27pm UTC](https://www.ruby-forum.com/t/rails-generate-scaffold-product-admin-overwrites-admin-page/68828/1 "2006-09-15T19:27:04Z")

</div>

[This post belongs on the Rails mailing list but its server is full]

Rubies:

I’m up to the infamous Page 57 in Joel Spolsky’s most favoritest book in  
the  
whole world, /Agile Web D. with Rails/ by the Daves.

It says:

ruby script/generate scaffold Product Admin

That makes an instant view and editor into the Product model and  
database  
table.

Now suppose I want to, uh, create a second database table, and I need a  
second administration view on it. So I create the table, and then run  
this:

ruby script/generate scaffold AnotherTable Admin

The system overwrites (with permission) the exiting administration  
files.

What’s the fix? Should I rename the prior files? If so, what’s the exact  
list to rename, and how to keep them linked in?

---

<div class="post-metadata">

**Author:** ![Phlip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed8c4c/32.png) [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Post date:** [September 15, 2006, 11:40pm UTC](https://www.ruby-forum.com/t/rails-generate-scaffold-product-admin-overwrites-admin-page/68828/2 "2006-09-15T23:40:04Z")

</div>

Phlip wrote:

> [This post belongs on the Rails mailing list but its server is full]

That is not really an excuse 🙂

Until they fix it, #rubyonrails on [irc.freenode.net](http://irc.freenode.net) may  
(or may not) be able to help.

> The system overwrites (with permission) the exiting administration  
> files.
> 
> What’s the fix? Should I rename the prior files? If so, what’s the exact  
> list to rename, and how to keep them linked in?

Two different things cannot be named the same, I believe.
