RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: resources xViews x
HTTP Caching
Episode #321 – Jan 30, 2012 – 57 comments

HTTP Caching

With HTTP response headers you can the cache in the user's browser and proxies. Etags, Last-Modified, Cache-Control and Rack::Cache are all covered here (15 minutes)
Draper
Episode #286 – Oct 03, 2011 – 71 comments

Draper

Clean up complex view logic using Draper. This gem provides decorators (much like presenters) which bundles view logic in an object oriented fashion. In this episode I do a step-by-step refactoring of a complex template into a decorator. (12 minutes)
Form Builders
Episode #311 – Dec 26, 2011 – 42 comments

Form Builders

Forms often follow a similar pattern with a lot of repetition. Learn how to clean up form views and remove duplication with the help of form builders. (12 minutes)
Sharing Mustache Templates
Episode #295 – Oct 31, 2011 – 55 comments

Sharing Mustache Templates

Mustache is a simple, logic-less templating language which allows you to use the same template for both Ruby and JavaScript. See how to set it up with a custom template handler in this episode. (17 minutes)
Running JavaScript in Ruby
Episode #297 – Nov 07, 2011 – 47 comments

Running JavaScript in Ruby

Sometimes logic needs to be shared between the server-side (Ruby) and the client-side (JavaScript). Here I show how to run JavaScript directly in Ruby through ExecJS and therubyracer. (14 minutes)
Markdown with Redcarpet
Episode #272 – Jun 27, 2011 – 86 comments

Markdown with Redcarpet

Redcarpet is an easy-to-use gem which interprets Markdown. Here I show how to customize it and add syntax highlighting through Pygments and Albino. (6 minutes)
Nested Model Form Part 2
Episode #197 – Jan 18, 2010 – 215 comments

Nested Model Form Part 2

Add and remove nested model fields dynamically through JavaScript using either Prototype or jQuery. (12 minutes)
HTTP Streaming
Episode #266 – May 16, 2011 – 53 comments

HTTP Streaming

HTTP Streaming allows the browser to start processing the HTML response while the Rails app is still processing the rest of the request. (9 minutes)
Template Inheritance
Episode #269 – Jun 06, 2011 – 43 comments

Template Inheritance

In Rails 3.1 the controller inheritance also applies to the view layer. Here I show how to add an application template which is shared by all views, and a lookup path for overriding templates based on the subdomain. (8 minutes)
Decent Exposure
Episode #259 – Mar 28, 2011 – 57 comments

Decent Exposure

The decent_exposure gem makes it convenient to share controller data with the view through methods instead of instance variables. (9 minutes)