Iteration C2: Adding a Page Layout

The pages in a typical website often share a similar layout; the designer will have created a standard template that’s used when content is placed. Our job is to modify this page to add decoration to each of the store pages.

So far, we’ve made only minimal changes to application.html.erb—namely, to add a class attribute in Iteration A2. As this file is the layout used for all views for all controllers that don’t otherwise provide a layout, we can change the look and feel of the entire site by editing one file. This makes us feel better about putting a placeholder page layout in for now; we can update it when the designer eventually returns from the islands.

Let’s update this file to define a banner and ...

Get Agile Web Development with Rails 5.1 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.