Scaffold Generator in Ruby
From the Ruby on Rails cheat sheet · Generators · verified Jul 2026
Scaffold Generator
Generate complete CRUD resource with all components
bash
# Full scaffold
rails generate scaffold Post title:string body:text published:boolean
# API scaffold
rails generate scaffold_controller api/v1/Article \
title:string body:text \
--api✅ Creates model, migration, controller, views, routes, tests
💡 Great for prototyping, customize afterwards
🔍 --api flag creates API-only scaffold without views
⚠️ Generates a lot of files - review before committing
generatorscaffoldcrudfull-stack