From abc5f0a530b3ab9338a7da0ff8bc9cbe7ff4ce40 Mon Sep 17 00:00:00 2001 From: Yos Riady Date: Sun, 2 Aug 2015 17:40:00 +0800 Subject: [PATCH] Fix limit for PostGIS geometry column types --- lib/rails_erd/domain/attribute.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rails_erd/domain/attribute.rb b/lib/rails_erd/domain/attribute.rb index d3dbf93c..bbedfe41 100644 --- a/lib/rails_erd/domain/attribute.rb +++ b/lib/rails_erd/domain/attribute.rb @@ -125,6 +125,7 @@ def type_description # Returns any non-standard limit for this attribute. If a column has no # limit or uses a default database limit, this method returns +nil+. def limit + return if native_type == 'geometry' return column.limit.to_i if column.limit != native_type[:limit] and column.limit.respond_to?(:to_i) column.precision.to_i if column.precision != native_type[:precision] and column.precision.respond_to?(:to_i) end