db/migrate/20150312064853_create_print_jobs_for_faxes.rb
def up
    Fax.find_each do |fax|
      print_job = fax.print_jobs.new(
        cups_job_id:     fax.print_job_id,
        cups_job_status: fax.state,
        created_at:      fax.created_at,
        updated_at:      fax.updated_at
      )
      if print_job.save
        fax.update(print_job_id: nil)
      end
    end
  end
# Convert Fax#print_job_id to new print job for each fax.
Convert Fax#print_job_id to new print job for each fax.
Convert Fax#print_job_id to new print job for each fax .
def up
    Fax.find_each do |fax|
      print_job = fax.print_jobs.new(
        cups_job_id:     fax.print_job_id,
        cups_job_status: fax.state,
        created_at:      fax.created_at,
        updated_at:      fax.updated_at
      )
      if print_job.save
        fax.update(print_job_id: nil)
      end
    end
  end
def up Fax . find_each do | fax | print_job = fax . print_jobs . new ( cups_job_id : fax . print_job_id , cups_job_status : fax . state , created_at : fax . created_at , updated_at : fax . updated_at ) if print_job . save fax . update ( print_job_id : nil ) end end end
Convert Fax#print_job_id to new print job for each fax.
Convert Fax#print_job_id to new print job for each fax .