From 5ff6b14be102924109ce609f9929f67432bf9654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?U=C4=A3is=20Ozols?= Date: Sat, 8 Oct 2011 00:16:36 +0300 Subject: [PATCH] Call .underscore on a model name because we don't want namespaced models to create folders like module::class. It will be module/class instead. --- lib/acts_as_indexed/class_methods.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/acts_as_indexed/class_methods.rb b/lib/acts_as_indexed/class_methods.rb index 6146e16..349c389 100644 --- a/lib/acts_as_indexed/class_methods.rb +++ b/lib/acts_as_indexed/class_methods.rb @@ -52,7 +52,7 @@ def acts_as_indexed(options = {}) end # Add the Rails environment and this model's name to the index file path. - self.aai_config.index_file = self.aai_config.index_file.join(Rails.env, self.name) + self.aai_config.index_file = self.aai_config.index_file.join(Rails.env, self.name.underscore) end # Adds the passed +record+ to the index. Index is built if it does not already exist. Clears the query cache.