fix non qualified table name in Course#update_enrolled_users

refs CNVS-21900

Change-Id: Id01b29e93545f52b50b6ec38a889a3a620b4e68d
Reviewed-on: https://gerrit.instructure.com/65667
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
Cody Cutrer 2015-10-22 13:41:49 -06:00
parent 0c0e056557
commit dc86c80c8e
1 changed files with 1 additions and 1 deletions

View File

@ -798,7 +798,7 @@ class Course < ActiveRecord::Base
end end
Enrollment.where(:course_id => self).update_all(:updated_at => Time.now.utc) Enrollment.where(:course_id => self).update_all(:updated_at => Time.now.utc)
User.where("id IN (SELECT user_id FROM enrollments WHERE course_id=?)", self). User.where(id: Enrollment.where(course_id: self).select(:user_id)).
update_all(updated_at: Time.now.utc) update_all(updated_at: Time.now.utc)
end end
end end