Have you ever been curious about that Rails magic? Have you found the code daunting? In this course, we will create a template handler, a custom renderer, and a file resolver. Along the way we will explore the Rails rendering stack and get a better handle on the Rails code, which will make the custom code work easy!
A Simple Renderer Welcome to Pluralsight, I'm Noel Peden and you're watching Rails Rendering. This first module is called A Simple Renderer. In this course, we are going to first create a simple template handler and let you see exactly how quick and easy it is to create one, then we're going to go into the rails code and see what exactly is involved in the rendering process, and then after that we will dive in and create a more complete custom renderer, including some API like behavior similar to what happens in Rails with JSON and then we'll go back into the Rails code and view the resolver process, or how Rails finds a template. Last of all, we'll create our own custom resolver and we will create one that retrieves templates from the Amazon S3 simple storage service. Along the way, you should get a good tour of at least part of the Rails code and get a better handle on how Rails structures things. It should be easier for you to dive in and explore the Rails code and understand what's going on. Also, you should be ready to jump in and create custom solutions for Rails, at least when it comes to rendering. Let's get started.
A More Complete Render Welcome to Pluralsight, I'm Noel Peden and you're watching A More Complete Render. In this module we're going to take the code the that we created in the first part of the course and expand it into a Rails plugin that'll be much more flexible that way, but of course we'll render spreadsheet files and we're also going to make it work with the respond_with function. We'll also add a custom:XLSX renderer for more specific situations. We'll see how to use the template renderer to generate a mail attachment and to test for it, and we'll even see how to use the template handler to generate a spreadsheet inside of a script, inside, or outside of Rails.
Creating a File Resolver Welcome to Pluralsight, I'm Noel Peden and you're watching Creating a File Resolver. In the last module we saw in the Rails code how resolvers fit into the process and how the Rails file resolver finds files on disc. In this module we're going to take the widgets app that we created in the first module, a very simple Rails app that just displays widgets and we're going to make it so it can retrieve templates from the Amazon Simple Storage Service, the AWS S3 service. To do that we are going to create our own file resolver, we'll call it the S3 Resolver and eventually to make it perform a bit better we will add some caching to that class.