From 31ff20a3325a3afb53b17ddf855a6f6c0353931b Mon Sep 17 00:00:00 2001 From: Doug Orleans Date: Mon, 3 Sep 2012 02:24:00 -0400 Subject: [PATCH] Fix failing test - clear @new_record on synchronize. --- lib/activerecord-import/synchronize.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/activerecord-import/synchronize.rb b/lib/activerecord-import/synchronize.rb index 60408e5..cf97dbe 100644 --- a/lib/activerecord-import/synchronize.rb +++ b/lib/activerecord-import/synchronize.rb @@ -43,6 +43,7 @@ module ActiveRecord # :nodoc: instance.clear_aggregation_cache instance.clear_association_cache instance.instance_variable_set '@attributes', matched_instance.attributes + instance.instance_variable_set '@new_record', false end end end @@ -52,4 +53,4 @@ module ActiveRecord # :nodoc: self.class.synchronize(instances, key) end end -end \ No newline at end of file +end