aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activerecord/lib/active_record/associations/association_proxy.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/activerecord/lib/active_record/associations/association_proxy.rb b/activerecord/lib/active_record/associations/association_proxy.rb
index 3cd1a1d922..7d8f4670fa 100644
--- a/activerecord/lib/active_record/associations/association_proxy.rb
+++ b/activerecord/lib/active_record/associations/association_proxy.rb
@@ -264,13 +264,7 @@ module ActiveRecord
end
else
def flatten_deeper(array)
- array.sum [] do |elem|
- if elem.respond_to?(:each)
- flatten_deeper(elem)
- else
- [elem]
- end
- end
+ array.flatten
end
end