Created
February 28, 2011 17:01
-
-
Save robdimarco/847622 to your computer and use it in GitHub Desktop.
Bootstrapping ActiveRecord from database.yml
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
require 'rubygems' | |
require 'active_record' | |
ActiveRecord::Base.establish_connection YAML.load(File.open(File.join(Rails.root, "config", "database.yml")))[Rails.env] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment