RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: javascript xViews x
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)
Passing Data to JavaScript
Episode #324 – Feb 13, 2012 – 77 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)
Destroy without JavaScript (revised)
Episode #77 – Jun 16, 2012 – 48 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)
Unobtrusive Javascript
Episode #205 – Mar 15, 2010 – 84 comments

Unobtrusive Javascript

Keep JavaScript out of your HTML content with unobtrusive JavaScript. Here I show how Rails 3 works with this best practice. (13 minutes)
Ember Part 1
Episode #408 – Mar 04, 2013 – 161 comments

Ember Part 1

Ember.js is a javascript framework for making rich client-side applications. In the first part of this two part series I show how to setup templates, controllers, and routes. (15 minutes)
Nested Model Form (revised)
Episode #196 – Apr 19, 2012 – 228 comments

Nested Model Form (revised)

Handling multiple models in a single form is easy with accepts_nested_attributes_for. Here you will also learn how to add and remove nested records through JavaScript. (11 minutes)
jQuery & Ajax (revised)
Episode #136 – Sep 28, 2012 – 146 comments

jQuery & Ajax (revised)

Here I go back to the basics and show how to turn a traditional Rails app into one that interacts through Ajax by adding "remote" options, JavaScript templates and a dabble of jQuery. (14 minutes)
Twitter Bootstrap Basics
Episode #328 – Feb 28, 2012 – 138 comments

Twitter Bootstrap Basics

Twitter Bootstrap can help make beautiful web apps quickly by providing you with useful CSS and JavaScript. Here you will learn how to include it into Rails with the twitter-bootstrap-rails gem. (10 minutes)
DataTables
Episode #340 – Apr 11, 2012 – 173 comments

DataTables

DataTables makes it easy to convert a plain HTML table into one with pagination, sorting, and searching - all done with JavaScript and jQuery. Here I show how to set this up and use a Rails application as the data source. (9 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)