diff options
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/associations/has_many_through_association.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/relation/predicate_builder.rb | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/associations/has_many_through_association.rb b/activerecord/lib/active_record/associations/has_many_through_association.rb index 2099effbeb..d1458f30ba 100644 --- a/activerecord/lib/active_record/associations/has_many_through_association.rb +++ b/activerecord/lib/active_record/associations/has_many_through_association.rb @@ -136,7 +136,7 @@ module ActiveRecord records = load_target if records == :all scope = through_association.scope - scope.where! construct_join_attributes(*records) unless records.empty? + scope.where! construct_join_attributes(*records) case method when :destroy diff --git a/activerecord/lib/active_record/relation/predicate_builder.rb b/activerecord/lib/active_record/relation/predicate_builder.rb index db2588e725..24cbae83de 100644 --- a/activerecord/lib/active_record/relation/predicate_builder.rb +++ b/activerecord/lib/active_record/relation/predicate_builder.rb @@ -17,8 +17,6 @@ module ActiveRecord queries.concat expand(association && association.klass, table, k, v) end end - elsif value.is_a?(Array) && value.empty? - raise ArgumentError, "Condition value in SQL clause can't be an empty array" else column = column.to_s |