Cover Page by Chad Pytel, Tammer Saleh

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Chapter 3. Views

The V in MVC—View in a Ruby on Rails application—is the presentation layer. The default view-rendering engine built into Ruby on Rails is ERb, and when Rails was first released, standard ERb templates were the only built-in supported type of template. As Rails has evolved, so has the capability of the View layer, expanding to include the ability to render different views based on MIME type and to include a new technology called RJS, among other changes.

Like the rest of the Rails framework, views follow convention over configuration. Rails encourages standard names and locations for view files, standard locations for helpers, conventions for common DOM elements, and so on. With this organization, everything has a place and ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required