Fix update_all when FROM is a subquery
UPDATE statement was incorrect because the SQL code doesn't include the subquery: batch.update_all(service_hash) We have to include that in the query: Service.where(id: batch.select(:id)).update_all(service_hash)
Showing
Please register or sign in to comment