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.