diff --git a/lib/odbc_adapter/adapters/null_odbc_adapter.rb b/lib/odbc_adapter/adapters/null_odbc_adapter.rb index 04eab19c..484f5c0a 100644 --- a/lib/odbc_adapter/adapters/null_odbc_adapter.rb +++ b/lib/odbc_adapter/adapters/null_odbc_adapter.rb @@ -4,9 +4,7 @@ module Adapters # registry. This allows for minimal support for DBMSs for which we don't # have an explicit adapter. class NullODBCAdapter < ActiveRecord::ConnectionAdapters::ODBCAdapter - class BindSubstitution < Arel::Visitors::ToSql - # BindVisitor was removed in Arel 9, or Rails 5.2 - include Arel::Visitors::BindVisitor if Arel::VERSION.to_i < 9 + class BindSubstitution < Arel::Visitors::ToSql end # Using a BindVisitor so that the SQL string gets substituted before it is diff --git a/odbc_adapter.gemspec b/odbc_adapter.gemspec index 4ed16569..f3a8ed01 100644 --- a/odbc_adapter.gemspec +++ b/odbc_adapter.gemspec @@ -19,7 +19,7 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ['lib'] - spec.add_dependency 'activerecord', '~> 5.0' + spec.add_dependency 'activerecord', '>= 5.2', '< 7' spec.add_dependency 'ruby-odbc', '~> 0.9' spec.add_development_dependency 'bundler', '>= 1.14'