Sha256: e9568ea1aae32280a881a90dacf9f0c3a833ac35973af261329dd73073aa7e18
Contents?: true
Size: 608 Bytes
Versions: 2
Compression:
Stored size: 608 Bytes
Contents
require 'yaml' system("mysql -uroot < spec/db_schema.sql") module ActiveRecord class Base self.configurations = YAML.load_file(File.join(File.dirname(__FILE__), "database.yml")) establish_connection establish_fresh_connection :slave1 end end class Parent < ActiveRecord::Base self.abstract_class = true end class Slave2 < ActiveRecord::Base self.abstract_class = true establish_fresh_connection :slave2 end class User < ActiveRecord::Base has_one :address has_many :tels end class Address < ActiveRecord::Base belongs_to :user end class Tel < Slave2 belongs_to :user end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fresh_connection-0.2.1 | spec/prepare.rb |
fresh_connection-0.2.0 | spec/prepare.rb |