app/controllers/concepts/hierarchical_controller.rb in iqvoc-3.2.11 vs app/controllers/concepts/hierarchical_controller.rb in iqvoc-3.3.0
- old
+ new
@@ -46,10 +46,10 @@
scope.tops.includes(:narrower_relations)
end
end
# When in single query mode, AR handles ALL includes to be loaded by that
# one query. We don't want that! So let's do it manually :-)
- Iqvoc::Concept.base_class.send(:preload_associations, @concepts, Iqvoc::Concept.base_class.default_includes + [:pref_labels])
+ ActiveRecord::Associations::Preloader.new(@concepts, Iqvoc::Concept.base_class.default_includes + [:pref_labels]).run
@concepts.sort! do |a, b|
a.pref_label.to_s <=> b.pref_label.to_s
end