Creating a scaffold migration in Rails

Public, Rails General

harrylevine

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".

http://docs.railsbridge.org/intro-to-rails/creating_a_migration