fix error
This commit is contained in:
1 parent
7568aaafaf
commit
5758a91865
1 file changed
+5
-5
@@ -18,7 +18,7 @@ class ArchiveFile
|
||||
before_save do
|
||||
cat = self.category rescue nil
|
||||
if cat && ArchiveCategory.where(:category_id => cat.id).count==0
|
||||
ArchiveCategory.create(category_id: cat.id.to_s)
|
||||
ArchiveCategory.create(category_id: cat.id.to_s,sort_number: cat.sort_number)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -109,10 +109,10 @@ class ArchiveFile
|
||||
end
|
||||
|
||||
def save_archive_file_multiples
|
||||
self.archive_file_multiples.each do |t|
|
||||
if t.should_destroy
|
||||
t.destroy
|
||||
end
|
||||
self.archive_file_multiples.each do |t|
|
||||
if t.should_destroy
|
||||
t.destroy
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user