Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Rails environment to index name #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pfeiffer
Copy link

Closes #5

@jeroig
Copy link
Collaborator

jeroig commented Jan 31, 2011

Hi,

Be careful with this change for two reason.
1- Integration test not pass

1) Failure:
test_index_name(ElasticIndexTest) [./test/define_index_test.rb:10]:
<"users_test"> expected but was
<"elastic_index_test-user">.

2- (and more important yet) Names of the indexes like class names (rails concept)
See the patch fc5a034

I think that you can do the change something like that

@index_name = [options[:index_name] || self.name.underscore.gsub(/\//,'-'), Rails.env].join("_")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Add environment name to index name
2 participants