title: Appending to a file read in rails
body: <p>I want to be able to upload a CSV of recipients for an event mailing. I've got the upload portion working and my application is saving the data to a database, however, I need to add two fields that I don't expect the user to know.</p>
  
  <pre><code>    csv_text = File.read(params[:file].path)
      csv = CSV.parse(csv_text, :headers =&gt; true)
      csv.each do |row|
          Recipient.create!(row.to_hash)
      end
  </code></pre>
  
  <p>I want to add the :event_id and the :mailing_id and I don't expect the user to know this so I don't expect them to put it in the CSV when they upload. Those details are being passed with the request:</p>
  
  <pre><code>Request
  
  Parameters:
  
  {"utf8"=&gt;"✓",
   "authenticity_token"=&gt;"QvKQeTVQb1UJJHh4ulkF8T0r24QrpIuMPP4NXFOYJhM=",
   "file"=&gt;#&lt;ActionDispatch::Http::UploadedFile:0x007fbd4137fdb0 @tempfile=#&lt;Tempfile:/var/folders/js/39l33x3d2vd06c_v7hbymtw474d6cc/T/RackMultipart20150814-15094-11f1q3v&gt;,
   @original_filename="import_test.csv",
   @content_type="text/csv",
   @headers="Content-Disposition: form-data; name=\"file\"; filename=\"import_test.csv\"\r\nContent-Type: text/csv\r\n"&gt;,
   "commit"=&gt;"Save changes",
   "event_id"=&gt;"1",
   "mailing_id"=&gt;"1"}
  </code></pre>
  
  <p>How can I make sure these two fields are included when I insert the user into the database?</p>