Sha256: 5a81085ec2f3d47b1e2990417a0fd457029be6db1b1bc1e1f6de034a7e01b342
Contents?: true
Size: 789 Bytes
Versions: 19
Compression:
Stored size: 789 Bytes
Contents
module ArJdbc if ActiveRecord.const_defined? :ConnectionHandling # 4.0 ConnectionMethods = ActiveRecord::ConnectionHandling else # 3.x ConnectionMethods = (class << ActiveRecord::Base; self; end) end ConnectionMethods.module_eval do def jdbc_connection(config) adapter_class = config[:adapter_class] adapter_class ||= ::ActiveRecord::ConnectionAdapters::JdbcAdapter adapter_class.new(nil, logger, config) end def jndi_connection(config); jdbc_connection(config) end def embedded_driver(config) config[:username] ||= "sa" config[:password] ||= "" jdbc_connection(config) end private def jndi_config?(config) ::ActiveRecord::ConnectionAdapters::JdbcConnection.jndi_config?(config) end end end
Version data entries
19 entries across 19 versions & 1 rubygems