public
Fork of fragility/spatial_adapter
Description: Miscellaneous PostgreSQL-related changes to Spatial Adapter
Homepage: http://georuby.rubyforge.org/
Clone URL: git://github.com/melriffe/spatial_adapter.git
Mel Riffe (author)
Mon Aug 04 10:56:45 -0700 2008
commit  9b559a1fba884b9536c3f60c197164eda79f7309
tree    6a69604443a66f250b63042f8287834304800275
parent  816b2637518191375b7dfbbc09506db68b7e5797
spatial_adapter / init.rb
100644 13 lines (10 sloc) 0.353 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
class SpatialAdapterNotCompatibleError < StandardError
end
 
 
case ActiveRecord::Base.connection.adapter_name
when 'MySQL'
  require 'mysql_spatial_adapter'
when 'PostgreSQL'
  require 'post_gis_adapter'
else
  raise SpatialAdapterNotCompatibleError.new("Only MySQL and PostgreSQL are currently supported by the spatial adapter plugin.")
end