Skip to content

Instantly share code, notes, and snippets.

@ebetancourt
Created March 25, 2014 20:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ebetancourt/9770976 to your computer and use it in GitHub Desktop.
Save ebetancourt/9770976 to your computer and use it in GitHub Desktop.
class ApplicationController < ActionController::Base
def switch_database_connection
ActiveRecord::Base.establish_connection "production_user_fallback"
end
end
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