From 19f0f140746bfae588f145fcd89df1c8f6df3910 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sat, 3 Nov 2018 14:45:25 +0900 Subject: Checking boundable not only `IN` clause but also `NOT IN` clause --- activerecord/lib/arel/nodes/bind_param.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/lib/arel/nodes') diff --git a/activerecord/lib/arel/nodes/bind_param.rb b/activerecord/lib/arel/nodes/bind_param.rb index 91e9b2b70f..ba8340558a 100644 --- a/activerecord/lib/arel/nodes/bind_param.rb +++ b/activerecord/lib/arel/nodes/bind_param.rb @@ -23,6 +23,10 @@ module Arel # :nodoc: all def nil? value.nil? end + + def boundable? + !value.respond_to?(:boundable?) || value.boundable? + end end end end -- cgit v1.2.3