Problem understanding scaffolds


Scaffold will do it all (in a cookie cutter way), if given the right arguments.

script/generate scaffold User name:string profile:text NOTE:--------------------------------^ ----------------^

This single command will create a controller, model, views, and db/ migration for the User model with fields for name and profile.

rake db:migrate script/server

point your browser at: http://localhost:3000/users and follow the link to "New user".

look at the files:

app/controllers/users_controller.rb app/views/users/... app/models/user.rb db/migrate/...create_users.rb