Rails 2 new ways

Problem
To get used to the new ways of working with Rails 2.

Solution
Here are some of the new ways of doing things in Rails 2.

  1. Create a scaffold and migration on one step:
    ./script/generate scaffold product fied1_name:string field2_name:string field3_name:float

    Make sure that you don’t have any previous migration(ie manually created) for the same model, as the generator will stop and won’t overwrite the previous migration.