# #324 Passing Data to JavaScript

> Episode of [RailsCasts](https://podistic.com/podcast/railscasts.md) · Published February 13, 2012 · Duration 6:48

- **Listen on Podistic:** https://podistic.com/episode/324-passing-data-to-javascript
- **Video:** http://media.railscasts.com/assets/episodes/videos/324-passing-data-to-javascript.mp4 (video/mp4)

## About this episode

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.
