Created
November 3, 2010 02:25
-
-
Save mhuebert/660715 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
mongo_db = case Padrino.env | |
when :development then "overlap-dev-test-local" | |
when :production then "overlap-01" | |
when :test then "overlap-01-test" | |
end | |
port = case Padrino.env | |
when :development then "27017" | |
when :production then "27051" | |
when :test then "27031" | |
end | |
mongo_uri = case Padrino.env | |
when :development then "mongodb://localhost:"+port | |
when :production then "mongodb://user:[email protected]:"+port+"/"+mongo_db | |
when :test then "mongodb://user:[email protected]:"+port+"/"+mongo_db | |
end | |
Mongoid.database = Mongo::Connection.from_uri(mongo_uri).db(mongo_db) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment