Creating new Scaffolding

One of Rails great features is the ability to get a project up and going quickly and one of the features that allows this is scaffolding. There are a few things you will want to do with most applications: CRUD (create, read, update and delete) and scaffold sets up the pieces you need to do this. Generating a new scaffold:

$ rails g scaffold User first_name:string last_name:string email:string age:integer

Note: Once you run this on your console, it will automatically create Model, Controller, and View files.

After that, run this command for migration.

$ rake db:migrate OR rails db:migrate

You can view the status of migration, using this command.

$ rake db:migrate:status OR rails db:migrate:status

For more information, read more: