Source

RubyLearning / StatusWriter / lib / database_connection.rb

Full commit
1
2
3
4
5
6
require "rubygems"
require "active_record"
require "yaml"

dbconfig = YAML::load(File.open( "database.yml"))
ActiveRecord::Base.establish_connection(dbconfig)