Tag: learn rails 6: accelerated web development with ruby on rails

Model Generators

The model and scaffold generators will generate migrations suitable for creating a new model. The migration will contain instructions for creating the appropriate table. If you tell Rails which columns you want, expressions to add those columns will also be generated. For example, running: $ bin/rails generate model Product name:string description:text will create a migration […]