Skip to content

Commit

Permalink
add the ConnectionHandling module
Browse files Browse the repository at this point in the history
This is needed to support `db console` and probably others in rails 7
after rails/rails#46093 was merged
  • Loading branch information
copiousfreetime committed Dec 12, 2023
1 parent 86a6b34 commit d05adc6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/active_record/connection_adapters/postgis_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@
# :startdoc:

module ActiveRecord
module ConnectionHandling # :nodoc:
def postgis_adapter_class
ConnectionAdapters::PostGISAdapter
end

def postgis_connection(config)
postgis_adapter_class.new(config)
end
end

module ConnectionAdapters
class PostGISAdapter < PostgreSQLAdapter
ADAPTER_NAME = 'PostGIS'
Expand Down

0 comments on commit d05adc6

Please sign in to comment.