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 ...
Get Rails Crash Course 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.