O'Reilly logo

Crafting Rails 4 Applications, 2nd Edition by José Valim

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 4Sending Multipart Emails Using Template Handlers

  • The Rails template-handler API

  • Multipart templates with Action Mailer

  • Rails generators and railties

To finish our tour of the Rails rendering stack, let’s look at how Rails compiles and renders templates. So far, we’ve seen that a controller’s responsibility is to normalize the rendering options and send them to the view renderer. Based on these options, the view renderer asks the lookup context to search for a specific template in the available resolvers, also taking into account the locale and format values the lookup context holds.

As we saw in Writing the Code, the resolver returns instances of ActionView::Template, and at the moment those instances are initialized, we need to ...

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