title: Rails 4 + CSV: Change csv headers
body: <p>An instrument I use outputs a CSV file of data, but I cannot control the column names.  I would like to change the header row before importing the data (without editing the raw CSV file) so that I can use the following code to import into my database:</p>
  
  <pre><code>def self.import(file)
    CSV.foreach(file.path, headers: true) do |row|
      Foo.create! row.to_hash
    end
  end  
  </code></pre>
  
  <p><strong>How do I completely replace the header row with one of my own?</strong></p>