Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

script/destroy scaffold bug

#1118

Using Rails 2.1.0 I have observed the following unfortunate behaviour.

The problem is observed when creating more than one model using the scaffold method, then destroying one of them later. Example:

ruby script/generate scaffold Book title:string ruby script/generate scaffold Movie title:string

Now lets say Im editing my Book app, including some edits to the /public/stylesheets/scaffold.css file to make my application look nice.

Lets say now I decide that I dont need the Movie model after all, and delete that by executing:

ruby script/destroy scaffold Movie

Now, in spite of the fact that I still have a model using the .css file, it is deleted by the script. In fact even the entire stylesheets directory is deleted.

I dont think this is a good behaviour of the destroy script.

Reported by cuthbert · September 26th, 2008 @ 07:57 AM

State: wontfix
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. cuthbert
    cuthbert

    Seems my code was a little messed up by the formatting there. Just to let you know, the two ruby script/generate statemtents was intended to be on separate lines.

    September 26th, 2008 @ 08:01 AM

  2. josh
    josh
    • State changed from new to wontfix

    You should definitely rename the scaffold.css file if you intend to keep it.

    December 20th, 2008 @ 05:29 PM