aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation/predicate_builder.rb
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2017-09-26 13:22:12 -0600
committerSean Griffin <sean@seantheprogrammer.com>2017-09-26 13:23:26 -0600
commit9cf7e3494f5bd34f1382c1ff4ea3d811a4972ae2 (patch)
treec1f1a45eb13de1840c29370ac761a8dd93aed63e /activerecord/lib/active_record/relation/predicate_builder.rb
parent7352f8dbd25516f480433b03eb90dd4868b9d785 (diff)
downloadrails-9cf7e3494f5bd34f1382c1ff4ea3d811a4972ae2.tar.gz
rails-9cf7e3494f5bd34f1382c1ff4ea3d811a4972ae2.tar.bz2
rails-9cf7e3494f5bd34f1382c1ff4ea3d811a4972ae2.zip
Treat `Set` as an `Array` in `Relation#where`
I do not want to set the expectation that any enumerable object should behave this way, but this case in particular comes up frequently enough that I'm caving on this one. Fixes #30684.
Diffstat (limited to 'activerecord/lib/active_record/relation/predicate_builder.rb')
-rw-r--r--activerecord/lib/active_record/relation/predicate_builder.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/relation/predicate_builder.rb b/activerecord/lib/active_record/relation/predicate_builder.rb
index 5c42414072..be4b169f67 100644
--- a/activerecord/lib/active_record/relation/predicate_builder.rb
+++ b/activerecord/lib/active_record/relation/predicate_builder.rb
@@ -13,6 +13,7 @@ module ActiveRecord
register_handler(Range, RangeHandler.new(self))
register_handler(Relation, RelationHandler.new)
register_handler(Array, ArrayHandler.new(self))
+ register_handler(Set, ArrayHandler.new(self))
end
def build_from_hash(attributes)