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, 1st Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.