title: Incorporating Ruby into jqPlot
body: <h3>Context :</h3>
  <p>I'm trying to create a pie chart using jqPlot, gathering data from a Rails database.</p>
  <p>My problem occurs because jqplot doesn't understand the strings generated from event.name. If I manually insert a couple of strings, without going through Rails, it works fine.nI believe it has something to do with escaping characters it shouldn't be.</p>
  <p>The error I get from Firebug shows <code>events = [[&amp;quot;Title&amp;quot;, 1234566]]</code>. Thus jqplot tries to create this chart with <code>&amp;quot;Title&amp;quot;</code> as a key. It doesn't like that.</p>
  <p>I've tried using html_safe, to no avail.</p>
  <hr />
  <h3>Code :</h3>
  <pre><code>&lt;% things = [] %&gt;
    &lt;% @topEvents.each do |event| %&gt;
  &lt;% things &lt;&lt; [event.name, event.total] %&gt;
  &lt;% end %&gt;
  
  $.jqplot('topEvents', [ &lt;%= things %&gt; ], {
      seriesDefaults : {
          renderer : jQuery.jqplot.PieRenderer,
          rendererOptions : {
              showDataLabels: true
          }
      }
  });
  </code></pre>
  <hr />
  <h3>Environment :</h3>
  <ul>
  <li>Ruby 1.9.3</li>
  <li>Rails 3.2.6</li>
  <li>SQLite3 3.6.20</li>
  <li>jquery-rails 2.0.2 (RubyGem)</li>
  <li>JQuery 1.7.2</li>
  <li>jqplot 1.0.0_r1012.</li>
  </ul>