mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
Call update_all on a relation, not 'update' which exists on a model
This commit is contained in:
parent
8804f11e49
commit
2d4ba042f9
1 changed files with 3 additions and 3 deletions
|
|
@ -4,8 +4,8 @@ namespace :one_off do
|
|||
combined_school.update qualtrics_code: 5
|
||||
full_circle = School.find_by_name 'Full Circle High School'
|
||||
next_wave = School.find_by_name 'Next Wave Junior High School'
|
||||
SurveyItemResponse.where(school: [full_circle, next_wave]).update! school: combined_school
|
||||
full_circle.destroy
|
||||
next_wave.destroy
|
||||
SurveyItemResponse.where(school: [full_circle, next_wave]).update_all school_id: combined_school.id
|
||||
full_circle.destroy!
|
||||
next_wave.destroy!
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue