Sha256: 4b8322192f08123ab57019949b632b6baeaefd44c23ed05680dc82da87a11edb

Contents?: true

Size: 267 Bytes

Versions: 3

Compression:

Stored size: 267 Bytes

Contents

# frozen_string_literal: true

require 'erb'
require 'yaml'
require 'active_record'

config_file = File.expand_path('../../config/database.yml', __FILE__)
config = YAML.load(ERB.new(IO.read(config_file)).result)['db']

ActiveRecord::Base.establish_connection(config)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
active_record-mod_sql_log_subscriber-0.2.0 bin/connect_db.rb
active_record-mod_sql_log_subscriber-0.1.2 bin/connect_db.rb
active_record-mod_sql_log_subscriber-0.1.1 bin/connect_db.rb