Sha256: e74ef57d87c517096294ccaeae52be801a1743beaa1b47d0c3f829804660bfac

Contents?: true

Size: 856 Bytes

Versions: 5

Compression:

Stored size: 856 Bytes

Contents

require 'active_support/lazy_load_hooks'
require 'rgeo'
require 'armg/version'

ActiveSupport.on_load(:active_record) do
  require 'active_record/connection_adapters/abstract_mysql_adapter'
  require 'armg/wkb_generator'
  require 'armg/wkb_parser'
  require 'armg/abstract_mysql_adapter_ext'
  require 'armg/mysql_geometry'
  require 'armg/table_definition_ext'
  require 'armg/armg'

  ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter::NATIVE_DATABASE_TYPES[:geometry] = { name: "geometry" }
  ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter.prepend(Armg::AbstractMysqlAdapterExt)
  ActiveRecord::Type.register(:geometry, Armg::MysqlGeometry, adapter: :mysql2)
  ActiveRecord::ConnectionAdapters::MySQL::TableDefinition.prepend(Armg::TableDefinitionExt)
  ActiveRecord::ConnectionAdapters::MySQL::Table.prepend(Armg::TableDefinitionExt)
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
armg-0.4.4 lib/armg.rb
armg-0.4.3 lib/armg.rb
armg-0.4.2 lib/armg.rb
armg-0.4.1 lib/armg.rb
armg-0.4.0 lib/armg.rb