Sha256: 79ea11caf70f24c1222bbb195de5bf4cad2e4d623c2691e11628a6127553943f
Contents?: true
Size: 761 Bytes
Versions: 19
Compression:
Stored size: 761 Bytes
Contents
module Arel module Visitors module ArJdbcCompat protected if ToSql.instance_method('visit').arity == 1 def do_visit(x, a); visit(x); end # a = nil else # > AREL 4.0 def do_visit(x, a); visit(x, a); end end if ToSql.instance_method('visit_Arel_Nodes_SelectCore').arity == 1 def do_visit_select_core(x, a) # a = nil visit_Arel_Nodes_SelectCore(x) end else # > AREL 4.0 def do_visit_select_core(x, a) visit_Arel_Nodes_SelectCore(x, a) end end private def limit_for(limit_or_node) limit_or_node.respond_to?(:expr) ? limit_or_node.expr.to_i : limit_or_node end end ToSql.send(:include, ArJdbcCompat) end end
Version data entries
19 entries across 19 versions & 1 rubygems