Sha256: cc3f2c4ed6c2a4bdea454b938b3e89dfadde3edd9779245c32ce1d150f57f90e

Contents?: true

Size: 448 Bytes

Versions: 3

Compression:

Stored size: 448 Bytes

Contents

# Rails initialization
#
# This will load the adapter for the currently used database configuration, if
# it exists.

module SpatialAdapter
  class NotCompatibleError < ::StandardError
  end
end

begin
  adapter = ActiveRecord::Base.configurations[RAILS_ENV]['adapter']
  require "spatial_adapter/#{adapter}"
rescue LoadError
  raise SpatialAdapter::NotCompatibleError.new("spatial_adapter does not currently support the #{adapter} database.")
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
spatial_adapter-1.1.0 rails/init.rb
achirkunov-spatial_adapter-1.0.0 rails/init.rb
spatial_adapter-1.0.0 rails/init.rb