Sha256: 574c2d8f53c35a70dc417f3900e5a0c4adfd3d52ceb5cd9e39189242832aacaf
Contents?: true
Size: 509 Bytes
Versions: 77
Compression:
Stored size: 509 Bytes
Contents
require 'active_record' require 'rubypitaya/core/database_config' module RubyPitaya class DatabaseConnector def initialize(database_config) @database_config = database_config end def connect ActiveRecord::Base.establish_connection(@database_config.connection_data) ActiveRecord::Base.logger = ActiveSupport::Logger.new(STDOUT) ActiveSupport::LogSubscriber.colorize_logging = true end def disconnect ActiveRecord::Base.connection.close end end end
Version data entries
77 entries across 77 versions & 1 rubygems