5.1. Introduction

Scaffolding means purely and simply that a basic scaffold for an application is created via a generator. This scaffold not only contains the model but also a simple Web GUI (views) and of course a controller. The programming paradigm used for this is REST (Representational State Transfer).
You can find a definition of REST at http://en.wikipedia.org/wiki/Representational_state_transfer. My super short version: the inventor Roy Fielding described in 2000 how you can access data with a simple set of rules within the concept of CRUD (see http://en.wikipedia.org/wiki/Create,_read,_update_and_delete) and the specification of the Hypertext Transfer Protocol (HTTP). CRUD is the abbreviation for Create (SQL: INSERT), Read (SQL: SELECT), Update (SQL: UPDATE) and Delete (SQL: Delete). This created URLs that are easy to read for humans and have a certain logic. In this chapter, you will see examples showing the individual paths for the different CRUD functions.
I think the greatest frustration with Rail arises regularly from the fact that many beginners use scaffolding to get quick results without having proper basic knowledge of Ruby and without knowing what ActiveRecord is. They don't know what to do next. Fortunately, you have worked your way through Chapter 2, Ruby Basics, Chapter 3, First Steps with Rails and Chapter 4, ActiveRecord, so you will be able to understand and use scaffolding straight away.

Buy the new Rails 5.1 version of this book.

This chapter is an introduction to scaffolding, not an encyclopedia that covers all variations. Our focus is on the basic idea and on getting beginners started. The same applies to REST.

Thank you for your support and the visibility by linking to this website on Twitter and Facebook. That helps a lot!