JuanVqz / doctors

Sistema para doctores
1 stars 1 forks source link

Add hospital_id to Hospitalization model #555

Closed JuanVqz closed 6 months ago

JuanVqz commented 6 months ago
doctors = Doctor.all
doctors.each do |doctor|
  hospitalizations = Hospitalization.where(doctor_id: doctor.id)

  hospitalizations.each do |hospitalization|
    hospitalization.update(hospital_id: doctor.hospital_id)
  end
end
codeclimate[bot] commented 6 months ago

Code Climate has analyzed commit 233ba16b and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 95.0% (0.0% change).

View more on Code Climate.