diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-07-26 02:59:39 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-07-26 03:03:28 +0900 |
commit | 21c0e0e89176b832a286bc6381b6ca2a9a56f1de (patch) | |
tree | 585c235cb12d8f752dee4db1997151fcd06a7e83 /activerecord/lib/active_record/relation | |
parent | c146065b8df8b3893b9ae33111987d5f1c18d457 (diff) | |
download | rails-21c0e0e89176b832a286bc6381b6ca2a9a56f1de.tar.gz rails-21c0e0e89176b832a286bc6381b6ca2a9a56f1de.tar.bz2 rails-21c0e0e89176b832a286bc6381b6ca2a9a56f1de.zip |
Remove single element array preprocess
Since 213796f, array predicate handler supports making binds, so the
preprocess is no longer needed.
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r-- | activerecord/lib/active_record/relation/predicate_builder/polymorphic_array_value.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/predicate_builder/polymorphic_array_value.rb b/activerecord/lib/active_record/relation/predicate_builder/polymorphic_array_value.rb index 1bc066363c..b87b5c36dd 100644 --- a/activerecord/lib/active_record/relation/predicate_builder/polymorphic_array_value.rb +++ b/activerecord/lib/active_record/relation/predicate_builder/polymorphic_array_value.rb @@ -12,7 +12,7 @@ module ActiveRecord type_to_ids_mapping.map do |type, ids| { associated_table.association_foreign_type.to_s => type, - associated_table.association_foreign_key.to_s => ids.size > 1 ? ids : ids.first + associated_table.association_foreign_key.to_s => ids } end end |