Intern Track Roadmap

Scaffolding: rapid prototyping

This course runs the Rails scaffold generator for an Article resource in a disposable app and reads every file it produces. It covers the terminal output and the order of the internal generators. It then examines the generated migration, the empty model and the controller with all seven RESTful actions, including before_action and params.expect. The generated views and partials show what generic code looks like. The last lessons cover rails destroy, missing validations, the permit list and when scaffolding fits prototypes or internal tools.

What you'll learn

  • ✓Reading the scaffold generator's terminal output and the order of its internal generators
  • ✓How the generated migration and empty model map to column names and types
  • ✓The seven generated controller actions, before_action and params.expect
  • ✓How generated partials, shorthand render and the shared form_with form work
  • ✓Undoing a scaffold with rails destroy and rolling back its migration
  • ✓Gaps in generated code: validations, permitted params, styling and namespaced controllers
Free preview · Lesson 1 2 min read

Scaffold: what one command generates

Getting Article from nothing to a working feature took eight courses. There was a migration (ActiveRecord: migrations), a model with a validation (ActiveRecord: model introduction), and a controller with index, show, new and create (ActionController: actions). Then came a safe article_params…

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...