Commit fe1959597d7d56a05e718d8b1ef2273ba8ccb634

Authored by Cyril Mougel
2 parents c0445037 2dce0f09
Exists in master and in 1 other branch production

Merge pull request #542 from Stackato-Apps/master

check for MONGODB_URL if USE_ENV or HEROKU is set
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
config/initializers/mongo.rb
@@ -6,7 +6,7 @@ if config_file.file? && @@ -6,7 +6,7 @@ if config_file.file? &&
6 elsif ENV['HEROKU'] || ENV['USE_ENV'] 6 elsif ENV['HEROKU'] || ENV['USE_ENV']
7 # No mongoid.yml file. Use ENV variable to define your MongoDB 7 # No mongoid.yml file. Use ENV variable to define your MongoDB
8 # configuration 8 # configuration
9 - if mongo = ENV['MONGOLAB_URI'] || ENV['MONGOHQ_URL'] 9 + if mongo = ENV['MONGOLAB_URI'] || ENV['MONGOHQ_URL'] || ENV['MONGODB_URL']
10 settings = URI.parse(mongo) 10 settings = URI.parse(mongo)
11 database_name = settings.path.gsub(/^\//, '') 11 database_name = settings.path.gsub(/^\//, '')
12 else 12 else