Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Fixes Issue #33 #35

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ handle spatial datatypes in the following databases:
The following gems are required:

- GeoRuby
- ActiveRecord (version 2.2.2 and up)
- ActiveRecord (version 3.2.0 and up)

For PostgreSQL:

Expand Down
4 changes: 2 additions & 2 deletions lib/spatial_adapter/mysql2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require 'active_record/connection_adapters/mysql2_adapter'

module ActiveRecord::ConnectionAdapters
class SpatialMysql2Column < Mysql2Column
class SpatialMysql2Column < Mysql2Adapter::Column
include SpatialAdapter::SpatialColumn
extend SpatialAdapter::Base::Mysql::SpatialColumn
end
Expand All @@ -18,7 +18,7 @@ def columns(table_name, name = nil)#:nodoc:
if field[1] =~ GEOMETRY_REGEXP
ActiveRecord::ConnectionAdapters::SpatialMysql2Column
else
ActiveRecord::ConnectionAdapters::Mysql2Column
ActiveRecord::ConnectionAdapters::Mysql2Adapter::Column
end
klass.new(field[0], field[4], field[1], field[2] == "YES")
end
Expand Down
2 changes: 1 addition & 1 deletion spatial_adapter.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ Gem::Specification.new do |s|
s.add_development_dependency 'activerecord-jdbcmysql-adapter'
end

s.add_dependency 'activerecord', '>= 2.2.2', '< 3.1.0'
s.add_dependency 'activerecord', '>= 3.2.0'
s.add_dependency 'GeoRuby', '>= 1.3.0'
end
2 changes: 1 addition & 1 deletion spec/mysql2_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
it_should_behave_like 'a modified mysql adapter' do
let(:establish){ mysql2_connection }
let(:column) do
ActiveRecord::ConnectionAdapters::Mysql2Column
ActiveRecord::ConnectionAdapters::Mysql2Adapter::Column
end
let(:spatial_column) do
ActiveRecord::ConnectionAdapters::SpatialMysql2Column
Expand Down