Created
April 10, 2012 21:47
-
-
Save erickreutz/2354837 to your computer and use it in GitHub Desktop.
Heroku and Elasticsearch with Tire
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'uri' | |
if ENV['BONSAI_INDEX_URL'].present? | |
uri = URI( ENV['BONSAI_INDEX_URL'] ) | |
Tire.configure { | |
url "#{uri.scheme}://#{uri.host}" | |
global_index_name uri.path[/[^\/]+$/] | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment