title: rails csv.erb view includes whitespace
body: <p>I have an index.csv.erb file with the following code:</p>
  
  <pre><code>&lt;% headers = ['PrL', 'PrG', 'UOM', 'Quantity', 'Eff.Date', 'End Date','Price','Disc', 'P', 'Gr/Net'] %&gt;
  &lt;%= CSV.generate_line(headers).strip.html_safe %&gt;
  &lt;% @pricelist_price_groups.each do |pricelist_price_group| %&gt;
    &lt;% start_at = pricelist_price_group.start_at.strftime("%d/%m/%y") unless pricelist_price_group.start_at.blank? %&gt;
    &lt;% end_at = pricelist_price_group.end_at.strftime("%d/%m/%y") unless pricelist_price_group.end_at.blank?  %&gt;
  &lt;%= CSV.generate_line([pricelist_price_group.pricelist_id,
                           pricelist_price_group.price_group_id,
                           pricelist_price_group.sale_uom_id,
                           start_at,
                           end_at,
                           pricelist_price_group.price,
                           pricelist_price_group.disc_dollar,
                           pricelist_price_group.disc_percent,
                           pricelist_price_group.price_flag,
                           pricelist_price_group.gross_or_net]).strip.html_safe %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>I add any whitespace such as </p>
  
  <pre><code>&lt;% headers = ['PrL', 'PrG', 'UOM', 'Quantity', 'Eff.Date', 'End Date','Price','Disc', 'P', 'Gr/Net'] %&gt;
  
  &lt;%= CSV.generate_line(headers).strip.html_safe %&gt;
  </code></pre>
  
  <p>Then that whitespace is being written to the CSV file. Other cases include having two spaces as a tab before <code>&lt;%= CSV.generate_line</code></p>
  
  <p>It has to be because that is the view that rails is rendering. If there a way I can still retain the use of whitespace to keep the code clean?</p>