lib/searchkick/tasks.rb in searchkick-0.8.5 vs lib/searchkick/tasks.rb in searchkick-0.8.6
- old
+ new
@@ -20,10 +20,10 @@
namespace :reindex do
desc "reindex all models"
task :all => :environment do
Rails.application.eager_load!
- (Searchkick::Reindex.instance_variable_get(:@descendents) || []).each do |model|
+ Searchkick.models.each do |model|
puts "Reindexing #{model.name}..."
model.reindex
end
puts "Reindex complete"
end