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

Wrapping Up

In this chapter we created a renderer for the PDF format. Using these ideas, you can easily create renderers for formats such as CSV and ATOM and encapsulate any logic specific to your application in a renderer, as well. You could even create a wrapper for other PDF libraries that are able to convert HTML files to PDF, such as the paid Prince XML library or the open source Flying Saucer, which is written in Java but is easily accessible through JRuby.[12][13][14]

We also discussed the Rails rendering stack and its modularity. As Rails itself relies on this well-defined stack to extend Action Controller and Action Mailer, it makes the rendering API more robust; it was battle-tested by Rails’s own features and various use cases. As ...

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