Ruby rails: scaffolds

From wikinotes

Scaffolds allow you to very quickly create a CRUD representation of something on your website in one step.
It creates:

  • model
  • views (create, delete, update, etc.)
  • controllers

Example

rails generate scaffold Project \
  title:string \
  description:text \
  percent_complete:decimal

Afterwards you can go to any of the following:

create http://localhost:3000/projects/new
read

http://localhost:3000/projects/index
http://localhost:3000/projects/show

update http://localhost:3000/projects/edit
delete