title: Escape Comma from CSV in Ruby
body: <p>I'm creating a CSV download in my Ruby application which has some Dollar amount fields. These fields has data in cyrrency format like $35,456 and when such data comes in CSV it get seperated into two fiedls , data after comma moved to next column in CSV.</p>
  
  <p>Here is my code to render CSV</p>
  
  <pre><code>Sell Date, Sell Amount
  - @rows.each do |row|
    = "#{row[0]},#{number_to_currency(row[1], :precision =&gt; 2)}"
  </code></pre>
  
  <p>Here is the action used to return CSV</p>
  
  <pre><code>def fifolog
    @rows = Report.fifolog()
  respond_to do |format|
    format.csv { render csv: {:rows =&gt;@rows }}
  end
  end
  </code></pre>
  
  <p>Is there any escape character i can use to escape "," in ruby</p>
  
  <p>thanks</p>