Sha256: 19f2bec626b01ffa71d127a1daa30f2bc9539f2d9b9f6506e00344e4fbbadeb8

Contents?: true

Size: 608 Bytes

Versions: 2

Compression:

Stored size: 608 Bytes

Contents

require 'active_record'
module Doozer
  module ORM
    def self.load
      db_config = Doozer::Configs.db()
      # ActiveRecord::Base.allow_concurrency = true
      ActiveRecord::Base.establish_connection(
        :adapter  => db_config["adapter"],
        :host     => db_config["host"],
        :username => db_config["username"],
        :password => db_config["password"],
        :database => db_config["database"]
      )
      printf "ORM: #{Doozer::Configs.orm()} initialized...\n"
      # printf "ORM: logging initialized"
      ActiveRecord::Base.logger = Doozer::Configs.logger 
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
grippy-doozer-0.1.3 lib/doozer/orm/active_record.rb
grippy-doozer-0.1.4 lib/doozer/orm/active_record.rb