diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-11-02 12:00:04 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-11-02 12:00:04 -0700 |
commit | b364cb1083f4e9d7a9e313e5de1174046bcfcbd4 (patch) | |
tree | 536133866a96ce4f2a326d68199b2b672c405df9 /lib/arel/predications.rb | |
parent | 54798211ff9707917f59cbe0b044325065bff481 (diff) | |
download | rails-b364cb1083f4e9d7a9e313e5de1174046bcfcbd4.tar.gz rails-b364cb1083f4e9d7a9e313e5de1174046bcfcbd4.tar.bz2 rails-b364cb1083f4e9d7a9e313e5de1174046bcfcbd4.zip |
Look for `Enumerable` rather than `Array` in predicates
It's not quite duck typed, but it will allow us to pass in our own
objects with additional logic (like type casting).
Diffstat (limited to 'lib/arel/predications.rb')
-rw-r--r-- | lib/arel/predications.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/arel/predications.rb b/lib/arel/predications.rb index f11f8dc86d..ec779dd40f 100644 --- a/lib/arel/predications.rb +++ b/lib/arel/predications.rb @@ -55,7 +55,7 @@ Passing a range to `#in` is deprecated. Call `#between`, instead. eowarn end between(other) - when Array + when Enumerable Nodes::In.new self, quoted_array(other) else Nodes::In.new self, quoted_node(other) @@ -103,7 +103,7 @@ Passing a range to `#not_in` is deprecated. Call `#not_between`, instead. eowarn end not_between(other) - when Array + when Enumerable Nodes::NotIn.new self, quoted_array(other) else Nodes::NotIn.new self, quoted_node(other) |