aboutsummaryrefslogblamecommitdiffstats
path: root/spec/connections/postgresql_connection.rb
blob: 0fb6dfe065282585eae39db5dc0dab401e76116e (plain) (tree)
1
2
3
4
5
6
                              

                       
 

                                                   








                                              
puts "Using native PostgreSQL"
require "active_record"
require 'logger'

ActiveRecord::Base.logger = Logger.new("debug.log")

ActiveRecord::Base.configurations = {
  'unit' => {
    :adapter  => 'postgresql',
    :encoding => 'utf8',
    :database => 'arel_unit',
  }
}

ActiveRecord::Base.establish_connection 'unit'