From 6903dc3037a11a7cbc7d8cd43cdc2bc69a210c5a Mon Sep 17 00:00:00 2001 From: Kaito Date: Fri, 22 Jul 2011 11:10:14 +0800 Subject: [PATCH] adding modified design.rb for sloving dup prob --- app/models/design.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/design.rb b/app/models/design.rb index bd391b15..69817c0f 100644 --- a/app/models/design.rb +++ b/app/models/design.rb @@ -36,7 +36,9 @@ class Design def files=(attrs) files = eval(attrs.last) attrs[0].each do |a| - files.build(:file => a[:file], :to_save => true) + if(a[:id].nil?) + files.build(:file => a[:file], :to_save => true) + end end end