Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Small fix to choose the adapter spec or base class based on respond_to?

  • Loading branch information...
commit 99a242aa17ef8c06dea955620bb984ae3e93991e 1 parent 02c2a14
@nicksieger nicksieger authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/arjdbc/jdbc/adapter.rb
View
2  lib/arjdbc/jdbc/adapter.rb
@@ -112,7 +112,7 @@ def configure_arel2_visitors(config)
if defined?(::Arel::Visitors::VISITORS)
visitors = ::Arel::Visitors::VISITORS
visitor = nil
- adapter_spec = config[:adapter_spec] || self.class
+ adapter_spec = [config[:adapter_spec], self.class].detect {|a| a && a.respond_to?(:arel2_visitors) }
adapter_spec.arel2_visitors(config).each do |k,v|
visitor = v
visitors[k] = v
Please sign in to comment.
Something went wrong with that request. Please try again.