Sha256: 582904ab532b3f9c972cb63a6d25e62e5cbd6462fd10962fd3d19a6b874f283f
Contents?: true
Size: 1.29 KB
Versions: 17
Compression:
Stored size: 1.29 KB
Contents
module ActiveRecord module ConnectionAdapters module PostGIS module ColumnMethods def spatial(name, options = {}) raise "You must set a type. For example: 't.spatial type: :st_point'" unless options[:type] column(name, options[:type], options) end def geography(name, options = {}) column(name, :geography, options) end def geometry(name, options = {}) column(name, :geometry, options) end def geometry_collection(name, options = {}) column(name, :geometry_collection, options) end def line_string(name, options = {}) column(name, :line_string, options) end def multi_line_string(name, options = {}) column(name, :multi_line_string, options) end def multi_point(name, options = {}) column(name, :multi_point, options) end def multi_polygon(name, options = {}) column(name, :multi_polygon, options) end def st_point(name, options = {}) column(name, :st_point, options) end def st_polygon(name, options = {}) column(name, :st_polygon, options) end end PostgreSQL::Table.send(:include, ColumnMethods) end end end
Version data entries
17 entries across 17 versions & 1 rubygems