scaffoldで覚えておくと良いこと

script/generate scaffold item done:boolean priority:integer description:string due_date:date category_id:integer note_id:integer private:boolean
      exists  app/models/
      exists  app/controllers/
      exists  app/helpers/
      create  app/views/items
      exists  app/views/layouts/
      exists  test/functional/
      exists  test/unit/
      exists  test/unit/helpers/
      exists  public/stylesheets/
      create  app/views/items/index.html.erb
      create  app/views/items/show.html.erb
      create  app/views/items/new.html.erb
      create  app/views/items/edit.html.erb
      create  app/views/layouts/items.html.erb
overwrite public/stylesheets/scaffold.css? (enter "h" for help) [Ynaqdh] h
Y - yes, overwrite
n - no, do not overwrite
a - all, overwrite this and all others
q - quit, abort
d - diff, show the differences between the old and the new
h - help, show this help
overwrite public/stylesheets/scaffold.css? (enter "h" for help) [Ynaqdh] d # DIFFを指定
--- /home/xxxx/Aptana RadRails Workspace/ToDo/public/stylesheets/scaffold.css	2010-08-06 16:59:57.000000000 +0900
+++ /home/xxxx/Aptana RadRails Workspace/ToDo/public/stylesheets/scaffold.css20100806-28097-1f2w9ro-0	2010-08-06 17:18:31.000000000 +0900
@@ -12,14 +12,9 @@
   font-size: 11px;
 }
 
-/*
 a { color: #000; }
 a:visited { color: #666; }
 a:hover { color: #fff; background-color:#000; }
-*/
-a { color: #284907; }
-a:visited { color: #5c832f; }
-a:hover { color: #fff; background-color:#000; }
 
 .fieldWithErrors {
   padding: 2px;
@@ -27,11 +22,6 @@
   display: table;
 }
 
-.notice {
-  background-color: #5C832F;
-  color: #fff;
-}
-
 #errorExplanation {
   width: 400px;
   border: 2px solid red;
retrying
overwrite public/stylesheets/scaffold.css? (enter "h" for help) [Ynaqdh] y
       force  public/stylesheets/scaffold.css
      create  app/controllers/items_controller.rb
      create  test/functional/items_controller_test.rb
      create  app/helpers/items_helper.rb
      create  test/unit/helpers/items_helper_test.rb
       route  map.resources :items
  dependency  model
      exists    app/models/
      exists    test/unit/
      exists    test/fixtures/
      create    app/models/item.rb
      create    test/unit/item_test.rb
      create    test/fixtures/items.yml
      exists    db/migrate
      create    db/migrate/20100806081840_create_items.rb

public/scaffold.css をいじっていた場合、scaffoldで新規モデル追加しようとすると上書き確認のメッセージが出る。overwriteの確認でdを選択すると実行した場合の変更内容がdiffで表示されるので、取っておくと良いかも。nを選択すれば上書きしないで処理自体は続行されるので、修正点が大きくなっている場合はその方が安全。