adding modified design.rb for sloving dup prob
This commit is contained in:
parent
2f4c2b2d9b
commit
6903dc3037
|
@ -36,9 +36,11 @@ class Design
|
||||||
def files=(attrs)
|
def files=(attrs)
|
||||||
files = eval(attrs.last)
|
files = eval(attrs.last)
|
||||||
attrs[0].each do |a|
|
attrs[0].each do |a|
|
||||||
|
if(a[:id].nil?)
|
||||||
files.build(:file => a[:file], :to_save => true)
|
files.build(:file => a[:file], :to_save => true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
def cleanup_empty_fields
|
def cleanup_empty_fields
|
||||||
|
|
Reference in New Issue