Browse files

adding generic geometry module

This fixes errors with missing keys for symbol error when no geometry
type is specified and the database column is a generic geometry type
  • Loading branch information...
1 parent 5db2f4e commit 488944500acd5b096cf3213f02ccdca6d7eb8063 @teknofire teknofire committed Nov 30, 2011
Showing with 7 additions and 1 deletion.
  1. +1 −0 lib/postgis_adapter/acts_as_geom.rb
  2. +6 −1 lib/postgis_adapter/functions/common.rb
View
1 lib/postgis_adapter/acts_as_geom.rb
@@ -26,6 +26,7 @@ def has_geom(*geom)
when :polygon then PolygonFunctions
when :line_string, :multi_line_string then LineStringFunctions
when :multi_polygon then MultiPolygonFunctions
+ when :geometry then GeometryFunctions
end unless geom[0].kind_of? Symbol
end
alias :acts_as_geom :has_geom
View
7 lib/postgis_adapter/functions/common.rb
@@ -907,7 +907,12 @@ def covers? other
#
module MultiPolygonFunctions
end
-
+
+ #
+ # Generic Geometry
+ #
+ module GeometryFunctions
+ end
end
end
# NEW

0 comments on commit 4889445

Please sign in to comment.