Skip to content

Commit ee0a973

Browse files
committed
Backwards compatibility with pre BindVisitor arel
1 parent 5397b02 commit ee0a973

File tree

1 file changed

+4
-1
lines changed
  • lib/active_record/connection_adapters/mysql2spatial_adapter

1 file changed

+4
-1
lines changed

lib/active_record/connection_adapters/mysql2spatial_adapter/arel_tosql.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ module Arel
4040
module Visitors
4141

4242
class MySQL2Spatial < MySQL
43-
include Arel::Visitors::BindVisitor
43+
44+
if ::Arel::Visitors.const_defined?(:BindVisitor)
45+
include ::Arel::Visitors::BindVisitor
46+
end
4447

4548
FUNC_MAP = {
4649
'st_wkttosql' => 'GeomFromText',

0 commit comments

Comments
 (0)