title: Pass Rails JSON variable to javascript variable
body: <p>I have a Global JSON variable in my Ruby on Rails controller. 
  It looks like this <strong>@rails_side_json = { :name => 'Will', :age => 23 }.to_json</strong></p>
  
  <p>I want this to be assigned to my javascript variable (<strong>var javascript_side_json</strong>) which resides in my javascript file named custom.js.erb </p>
  
  <p>The value in javascript_side_json variable after the assignment is done should be equivalent to me writing 
  var javascript_side_json = {"name": "Will", "age": 23 };</p>
  
  <p>I am not able to achieve this by writing <strong>var javascript_side_json = &lt;%= @rails_side_json %></strong></p>
  
  <p>How can I achieve this? 
  Do I need to make changes in multiple files?</p>