title: Rails3 CSV putting &quot;&quot; instead of actual quotes
body: <p><i>Similar to <a href="https://stackoverflow.com/questions/3885687/ruby-on-rails-csv-putting-quotquot-instead-of-actual-quotes">this question</a> except I don't use <code>html_safe</code> anywhere in the whole project.</i></p>
  
  <p>I generate a CSV file in <code>index.csv.erb</code> like this:</p>
  
  <pre><code>&lt;%=
  response.content_type = 'application/octet-stream'
  CSV.generate do |csv|
    @persons.each do |person|
      csv &lt;&lt; [ person[:name], person[:nickname] ]
    end
  end
  %&gt;
  </code></pre>
  
  <p><b>PROBLEM:</b> If nickname is NULL in the database (ActiveRecord/MySQL) then the CSV file associated element becomes <code>&amp;quot;&amp;quot;</code>. I would expect <code>""</code>, or even nothing at all.</p>
  
  <p>Result file sample:</p>
  
  <pre><code>Nicolas, Nico
  Joe, &amp;quot;&amp;quot;
  </code></pre>
  
  <p>How can I prevent this from happening?</p>