Created
March 28, 2014 21:29
-
-
Save gworley3/9843371 to your computer and use it in GitHub Desktop.
DbCharmer - Getting Started - db_charmer.rb
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
SLAVE_DB_CONNECTIONS = (ENV['SLAVE_DATABASE_URLS'] || '').split(',').map do |db_url| | |
ENV[db_url] && Class.new(ActiveRecord::Base) { establish_connection(ENV[db_url]) }.connection | |
end.compact |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment