Created
August 20, 2013 15:23
-
-
Save rsl/6282912 to your computer and use it in GitHub Desktop.
conditional rescues. there has to be something better than this. this screams inefficient. but tbh it's not an issue that will really happen in production.
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
def create_database | |
Apartment::Database.create database_name | |
rescue Apartment::SchemaExists => err | |
raise err unless Rails.env.development? | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment