Created
March 25, 2014 20:47
-
-
Save ebetancourt/9770976 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
class ApplicationController < ActionController::Base | |
def switch_database_connection | |
ActiveRecord::Base.establish_connection "production_user_fallback" | |
end | |
end |
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
production_user_fallback: | |
adapter: postgresql | |
encoding: unicode | |
database: inter_staging | |
pool: 5 | |
username: username | |
password: supersecret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment