Module: ActiveRecord::ConnectionHandling

Defined in:
lib/active_record/connection_adapters/postgis/create_connection.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#jdbcpostgis_connectionObject



22
23
24
25
26
27
28
# File 'lib/active_record/connection_adapters/postgis/create_connection.rb', line 22

def postgis_connection(config)
  config = config.deep_dup
  config = symbolize_keys_if_necessary(config)

  config[:adapter_class] = ConnectionAdapters::PostGISAdapter
  postgresql_connection(config)
end

#postgis_connection(config) ⇒ Object

Based on the default postgresql_connection definition from ActiveRecord. github.com/rails/rails/blob/master/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb FULL REPLACEMENT because we need to create a different class.



14
15
16
17
18
19
20
# File 'lib/active_record/connection_adapters/postgis/create_connection.rb', line 14

def postgis_connection(config)
  config = config.deep_dup
  config = symbolize_keys_if_necessary(config)

  config[:adapter_class] = ConnectionAdapters::PostGISAdapter
  postgresql_connection(config)
end