RailsCasts
RailsCasts
Ryan Bates
#324 Passing Data to JavaScript
6 minutes Posted Feb 13, 2012 at 8:00 am.
0:00
6:48
Download MP3
Show notes
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.