DISCLAIMER: Scaffolding is not recommended unless it's for very conventional CRUD apps/testing. This may generate a lot of files(views/models/controllers) that are not needed in your web application thus causing headaches(bad :().
To generate a fully working scaffold for a new object, including model, controller, views, assets, and tests, use the
rails g scaffold command.
Then you can run
rake db:migrate to set up the database table.
Then you can visit http://localhost:3000/widgets and you'll see a fully functional CRUD scaffold.