O'Reilly logo

Rails Crash Course by Anthony Lewis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Views

A view is the user interface to your application. Typically, views include web pages for displaying database records and forms for creating and updating those records. Views also sometimes take the form of responses to API requests.

This chapter covers the most common Rails view template type, called Embedded Ruby, as well as view-specific helpers and layouts. You’ll also learn how to avoid duplication in your HTML code with partials and how to generate forms to accept user input.

Enter bin/rails server to start the Rails server now. And keep it running in a terminal window as you work through the examples in this chapter, so you can see the changes you make to the application in your web browser and watch the server output.

Embedded ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required