aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/arel/nodes
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-11-03 14:45:25 +0900
committerRyuta Kamizono <kamipo@gmail.com>2018-11-03 14:54:57 +0900
commit19f0f140746bfae588f145fcd89df1c8f6df3910 (patch)
treecf68ea3a89158590af474d1b66740aec452b9432 /activerecord/lib/arel/nodes
parentb858c2c76cbe66b50df81372156d4b6f6e187be1 (diff)
downloadrails-19f0f140746bfae588f145fcd89df1c8f6df3910.tar.gz
rails-19f0f140746bfae588f145fcd89df1c8f6df3910.tar.bz2
rails-19f0f140746bfae588f145fcd89df1c8f6df3910.zip
Checking boundable not only `IN` clause but also `NOT IN` clause
Diffstat (limited to 'activerecord/lib/arel/nodes')
-rw-r--r--activerecord/lib/arel/nodes/bind_param.rb4
1 files changed, 4 insertions, 0 deletions
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