scaffoldでページを生成

NetBeansでscaffold

Railsジェネレータでscaffoldを選択、モデル名と属性ペアを入力し了解ボタンを押下する。
ここで指定した属性ペアがページに表示され入力可能になる。

Railsジェネレータの出力
      exists  app/models/
      exists  app/controllers/
      exists  app/helpers/
      create  app/views/atomaps
      exists  app/views/layouts/
      exists  test/functional/
      exists  test/unit/
      exists  public/stylesheets/
      create  app/views/atomaps/index.html.erb
      create  app/views/atomaps/show.html.erb
      create  app/views/atomaps/new.html.erb
      create  app/views/atomaps/edit.html.erb
      create  app/views/layouts/atomaps.html.erb
      create  public/stylesheets/scaffold.css
      create  app/controllers/atomaps_controller.rb
      create  test/functional/atomaps_controller_test.rb
      create  app/helpers/atomaps_helper.rb
       route  map.resources :atomaps
  dependency  model
      exists    app/models/
      exists    test/unit/
      exists    test/fixtures/
      create    app/models/atomap.rb
      create    test/unit/atomap_test.rb
      create    test/fixtures/atomaps.yml
      exists    db/migrate
Another migration is already named create_atomaps: db/migrate/20080729211000_create_atomaps.rb

実行してみる。

http://localhost:3000/atomaps


取りあえずページの雛形が出来たのでこれをもとにがんがんカスタマイズ。