RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: rails xViews x
Destroy without JavaScript (revised)
Episode #77Jun 16, 201248 comments

Destroy without JavaScript (revised)

A destroy link in Rails does not work without JavaScript. In this episode I show two techniques for gracefully degrading destroy links: button_to and a delete action. (8 minutes)
Syntax Highlighting (revised)
Episode #207May 11, 201258 comments

Syntax Highlighting (revised)

Here I compare several syntax highlighting solutions and show how to use Pygments in a Rails app. I also show how to integrate it with Markdown and add caching. (8 minutes)
Activity Feed from Scratch
Episode #407Feb 14, 2013101 comments

Activity Feed from Scratch

Creating an activity feed presents some interesting challenges. Here I share my thought process behind my implementation including when to use callbacks and a few tricks with partials. (14 minutes)
Rails 2.2 Extras
Episode #140Dec 15, 200845 comments

Rails 2.2 Extras

This episode finishes up the Rails 2.2 series by showing a few miscellaneous additions that I find useful. (4 minutes)
Charts & Graphs (revised)
Episode #223Sep 15, 2012116 comments

Charts & Graphs (revised)

If you have a lot of data, consider adding a graph to provide an overview of it. Here I show how to use Morris.js to chart an Order model and visualize trends in the data. (12 minutes)
Passing Data to JavaScript
Episode #324Feb 13, 201277 comments

Passing Data to JavaScript

There are a variety of ways to pass variables from a Rails application to JavaScript. Here I show three techniques: a script tag, a data attribute, and the Gon gem. (6 minutes)
Template Inheritance
Episode #269Jun 06, 201143 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)
HTTP Streaming
Episode #266May 16, 201153 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)
I18n Backends
Episode #256Mar 07, 201154 comments

I18n Backends

Internationalization is easy to add in Rails, but the YAML files can be difficult to manage. In this episode I show how to use Redis for managing the translations through a web interface. (11 minutes)
Template Handlers
Episode #379Sep 04, 201267 comments

Template Handlers

Here I will demonstrate creating two template handlers. One for Ruby which is great for JSON or CSV formats. Another for interpreting Markdown which is useful for informational content. (12 minutes)