Skip to content

Instantly share code, notes, and snippets.

@madsheep
Created December 8, 2011 11:39
Show Gist options
  • Save madsheep/1446776 to your computer and use it in GitHub Desktop.
Save madsheep/1446776 to your computer and use it in GitHub Desktop.
app/models/active_record/base.rb
class ActiveRecord::Base
establish_connection YAML.load_file("#{Rails.root}/config/database.yml")[Rails.env].symbolize_keys
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment