Creating the weight model and scaffolding

With one command line I’ve created the weight model and the scaffolding, a fully functional CRUD little app without my Rails app. I know all Rails developer are rolling eyes now; but I still think this is awesome. It gets you up and running so fast:

 ./script/generate scaffold weight user_id:integer weight:float timestamp:datetime
      exists  app/models/
      exists  app/controllers/
      exists  app/helpers/
      create  app/views/weights
      create  app/views/layouts/
      create  test/functional/
      exists  test/unit/
      create  test/unit/helpers/
      create  public/stylesheets/
      create  app/views/weights/index.html.erb
      create  app/views/weights/show.html.erb
      create  app/views/weights/new.html.erb
      create  app/views/weights/edit.html.erb
      create  app/views/layouts/weights.html.erb
      create  public/stylesheets/scaffold.css
      create  app/controllers/weights_controller.rb
      create  test/functional/weights_controller_test.rb
      create  app/helpers/weights_helper.rb
      create  test/unit/helpers/weights_helper_test.rb
       route  map.resources :weights
  dependency  model
      exists    app/models/
      exists    test/unit/
      exists    test/fixtures/
      create    app/models/weight.rb
      create    test/unit/weight_test.rb
      create    test/fixtures/weights.yml
      exists    db/migrate
      create    db/migrate/20091121135320_create_weights.rb

And this is what I’ve got:

sano-003

sano-004

sano-005

sano-006

sano-007

sano-008

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s