Commit c8ad80d37d16c87e1252bef47f0865b9f50c469f

Authored by Arthur Nogueira Neves
2 parents 8da43659 213746ab
Exists in master and in 1 other branch production

Merge pull request #710 from glebm/patch-1

Fallback to ENV['MONGO_URL']
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 6 elsif ENV['HEROKU'] || ENV['USE_ENV']
7 7 # No mongoid.yml file. Use ENV variable to define your MongoDB
8 8 # configuration
9   - if mongo = ENV['MONGOLAB_URI'] || ENV['MONGOHQ_URL'] || ENV['MONGODB_URL']
  9 + if mongo = ENV['MONGOLAB_URI'] || ENV['MONGOHQ_URL'] || ENV['MONGODB_URL'] || ENV['MONGO_URL']
10 10 settings = URI.parse(mongo)
11 11 database_name = settings.path.gsub(/^\//, '')
12 12 else
... ...