Skip to content

Commit

Permalink
Merge pull request #46 from kslazarev/fix_log
Browse files Browse the repository at this point in the history
Use namespace Mongoid::Search for Log class.
  • Loading branch information
mauriciozaffari committed Dec 5, 2012
2 parents 99cb4ea + 8662be3 commit dba5bcc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tasks/mongoid_search.rake
Expand Up @@ -2,14 +2,14 @@ namespace :mongoid_search do
desc 'Goes through all documents with search enabled and indexes the keywords.' desc 'Goes through all documents with search enabled and indexes the keywords.'
task :index => :environment do task :index => :environment do
if Mongoid::Search.classes.blank? if Mongoid::Search.classes.blank?
Log.log "No model to index keywords.\n" Mongoid::Search::Log.log "No model to index keywords.\n"
else else
Mongoid::Search.classes.each do |klass| Mongoid::Search.classes.each do |klass|
Log.silent = ENV['SILENT'] Mongoid::Search::Log.silent = ENV['SILENT']
Log.log "\nIndexing documents for #{klass.name}:\n" Mongoid::Search::Log.log "\nIndexing documents for #{klass.name}:\n"
klass.index_keywords! klass.index_keywords!
end end
Log.log "\n\nDone.\n" Mongoid::Search::Log.log "\n\nDone.\n"
end end
end end
end end

0 comments on commit dba5bcc

Please sign in to comment.