Created
August 29, 2013 22:13
-
-
Save TheDahv/6384061 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
if ENV['RACK_ENV'] == 'development' | |
# Connect to development db | |
elsif ENV['RACK_ENV'] == 'test' | |
# Connect to test db | |
else | |
# Last case. Connect to production | |
end | |
## Example using case statement | |
switch ENV['RACK_ENV'] | |
when 'development' | |
# Connect to development | |
when 'test' | |
# Connect to test | |
else | |
# Connect to production | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment