title: rails 3 json encode for consumption in javascript
body: <p>I know that to_json is deprecated and as_json is giving me problems.</p>
  
  <p>This line works fine, but to_json is deprecated:</p>
  
  <pre><code>new IS.Presentation(&lt;%= raw(@course_step.step.step_presentation.step_presentation_files.map { |item| {'url' =&gt; item.slide.url, 'title' =&gt; item.title}}.to_json) %&gt;)
  </code></pre>
  
  <p>Any ideas?</p>