Sha256: 510718a819b4cff3d257e1245866a76d258b28cd11edab515199f40b54ecab9a
Contents?: true
Size: 579 Bytes
Versions: 4
Compression:
Stored size: 579 Bytes
Contents
# Abstract base class for an ActiveRecord adapter module Castronaut::Adapters class ActiveRecordAdapter < Base # You must provide user_class. def self.configure options self.user_class.establish_connection(options['database']) self.user_class.logger = options['logger'] unless ENV["test"] == "true" if self.user_class.connection.tables.empty? STDERR.puts "#{self.class} - There are no tables in the given database.\nConfig details:\n#{options.inspect}" Kernel.exit(0) end end end end end
Version data entries
4 entries across 4 versions & 2 rubygems