1/ Locate all the classes that ‘acts_as_ferret’, and
2/ write a rake task like :
namespace :ferret do
desc “rebuid the ferret indexes”
task :rebuild => :environment do
[Foo, Bar].each{|klass|
puts “rebuilding the Ferret /#{RAILS_ENV}/ index for :
#{klass}…”
klass.rebuild_index
puts " done."
}
end
end
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.