Skip to content

Commit

Permalink
Fixes sunspot:reindex task to contemplate namespaced and 'moduled' mo…
Browse files Browse the repository at this point in the history
…dels
  • Loading branch information
jgradim committed Mar 22, 2011
1 parent 0824677 commit 0bf2eb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sunspot_rails/lib/sunspot/rails/tasks.rb
Expand Up @@ -48,7 +48,7 @@
end
unless args[:models]
models_path = Rails.root.join('app', 'models')
all_files = Dir.glob(models_root.join('**', '*.rb'))
all_files = Dir.glob(models_path.join('**', '*.rb'))
all_models = all_files.map { |path| path.sub(models_path.to_s, '')[0..-4].camelize.constantize rescue nil }.compact
sunspot_models = all_models.select { |m| m < ActiveRecord::Base and m.searchable? }
else
Expand Down

0 comments on commit 0bf2eb2

Please sign in to comment.