lib/postgis_adapter.rb in nofxx-postgis_adapter-0.2.1 vs lib/postgis_adapter.rb in nofxx-postgis_adapter-0.2.2
- old
+ new
@@ -2,11 +2,12 @@
# PostGIS Adapter
#
# Spatial Adapter PostGIS Adapter for ActiveRecord
#
#
-#require 'active_record'
+require 'activerecord'
+require 'active_record/connection_adapters/postgresql_adapter'
require 'geo_ruby'
require 'postgis_adapter/common_spatial_adapter'
require 'postgis_functions'
require 'postgis_functions/common'
require 'postgis_functions/class'
@@ -15,11 +16,11 @@
include GeoRuby::SimpleFeatures
include SpatialAdapter
module PostgisAdapter
- VERSION = '0.2.1'
+ VERSION = '0.2.2'
end
#tables to ignore in migration : relative to PostGIS management of geometric columns
ActiveRecord::SchemaDumper.ignore_tables << "spatial_ref_sys" << "geometry_columns"
@@ -248,10 +249,11 @@
#check the presence of z and m
raw_geom_info.convert!
end
raw_geom_infos
-
+ rescue => e
+ nil
end
end
module ActiveRecord