From d9f1428597619b62f6b2c1eb43de9899a1865de6 Mon Sep 17 00:00:00 2001 From: Alex Serebryakov Date: Thu, 27 May 2010 20:18:04 +0100 Subject: [PATCH] Fixing `replace` method to remove the annoying 'to_a will be obsolete' message --- lib/lib/associations/has_many.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lib/associations/has_many.rb b/lib/lib/associations/has_many.rb index c2fde45..3f9478a 100644 --- a/lib/lib/associations/has_many.rb +++ b/lib/lib/associations/has_many.rb @@ -14,7 +14,7 @@ def replace(objects) objects = [objects] end - new_objects = filter(objects.to_a) + new_objects = filter(objects) return self if new_objects.empty? new_objects.each do |child|