Module: ActiveRecord::ConnectionAdapters::Mysql2Rgeo::ColumnDefinitionUtils

Defined in:
lib/active_record/connection_adapters/mysql2rgeo/spatial_table_definition.rb

Class Method Summary collapse

Class Method Details

.default_srid(options) ⇒ Object



33
34
35
# File 'lib/active_record/connection_adapters/mysql2rgeo/spatial_table_definition.rb', line 33

def default_srid(options)
  options[:geographic] ? 4326 : Mysql2RgeoAdapter::DEFAULT_SRID
end

.geo_type(type = "GEOMETRY") ⇒ Object



29
30
31
# File 'lib/active_record/connection_adapters/mysql2rgeo/spatial_table_definition.rb', line 29

def geo_type(type = "GEOMETRY")
  type.to_s.delete("_").upcase
end