title: is there a way to save multiple records with attachements at once without calling insert each time
body: <p>I have some files that I need to save to the database, and every file should be attached to a instance of an <code>ActiveRecord</code> like so:</p>
  <pre><code>pdf_files.each do |pdf_file|
   cipher_file = ...
   payslip = MyhraPayslips::Payslip.new(myhra_users_user_id: user_to_update.id, payslip_date: 
            DateTime.parse(date).strftime(&quot;%Y-%m-%d&quot;))
   payslip.payslip.attach(io: File.open(cipher_file), filename: File.basename(pdf_file), 
           content_type: 'application/pdf')
   payslip.save
  end
  </code></pre>
  <p>Since I have many files, I want to insert them into the database all at once, and, because I have to call <code>attach</code> method on each record, I can't just do it with bulk insert or use <code>create</code> instead of <code>new</code>.</p>