Creating a scaffold migration in Rails

Public, Rails General


Created: Apr 26, 2016     Updated: Aug 21, 2016

1 - Make sure you have already created your rails app
2 - $ rails generate scaffold topic title:string description:text

This generate scaffold tells Rails to create everything necessary to get up and running with topics model.
- topic tells Rails the name of the new model.
- title:string says that Topic has a title, which is a "string".
- description:text says that Topic has a description which is a "text".