diff options
Diffstat (limited to 'activerecord/lib/arel')
-rw-r--r-- | activerecord/lib/arel/nodes/bind_param.rb | 4 | ||||
-rw-r--r-- | activerecord/lib/arel/visitors/to_sql.rb | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/activerecord/lib/arel/nodes/bind_param.rb b/activerecord/lib/arel/nodes/bind_param.rb index f145e44ae3..344e46479f 100644 --- a/activerecord/lib/arel/nodes/bind_param.rb +++ b/activerecord/lib/arel/nodes/bind_param.rb @@ -28,8 +28,8 @@ module Arel # :nodoc: all value.respond_to?(:infinite?) && value.infinite? end - def boundable? - !value.respond_to?(:boundable?) || value.boundable? + def unboundable? + value.respond_to?(:unboundable?) && value.unboundable? end end end diff --git a/activerecord/lib/arel/visitors/to_sql.rb b/activerecord/lib/arel/visitors/to_sql.rb index b5a960ce68..c08403eea9 100644 --- a/activerecord/lib/arel/visitors/to_sql.rb +++ b/activerecord/lib/arel/visitors/to_sql.rb @@ -576,7 +576,7 @@ module Arel # :nodoc: all def visit_Arel_Nodes_In(o, collector) if Array === o.right && !o.right.empty? - o.right.keep_if { |value| boundable?(value) } + o.right.delete_if { |value| unboundable?(value) } end if Array === o.right && o.right.empty? @@ -590,7 +590,7 @@ module Arel # :nodoc: all def visit_Arel_Nodes_NotIn(o, collector) if Array === o.right && !o.right.empty? - o.right.keep_if { |value| boundable?(value) } + o.right.delete_if { |value| unboundable?(value) } end if Array === o.right && o.right.empty? @@ -812,8 +812,8 @@ module Arel # :nodoc: all } end - def boundable?(value) - !value.respond_to?(:boundable?) || value.boundable? + def unboundable?(value) + value.respond_to?(:unboundable?) && value.unboundable? end def has_join_sources?(o) |