Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't use truncate table

  • Loading branch information...
commit 98e2d4fc495bbbfec0e4e5eb79128f734afde6f8 1 parent 262e35a
@winton authored
Showing with 1 addition and 5 deletions.
  1. +1 −5 lib/acts_as_archive/base/restore.rb
View
6 lib/acts_as_archive/base/restore.rb
@@ -19,11 +19,7 @@ def copy_from_archive(conditions)
FROM archived_#{table_name}
#{where}
})
- if where.empty?
- connection.execute("TRUNCATE TABLE archived_#{table_name}")
- else
- connection.execute("DELETE FROM archived_#{table_name} #{where}")
- end
+ connection.execute("DELETE FROM archived_#{table_name} #{where}")
end
def restore_all(conditions=nil)
Please sign in to comment.
Something went wrong with that request. Please try again.