Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

tables may also be escaped with "

  • Loading branch information...
commit 206d255512b1fc5d89d2738160dd576a6f7d657d 1 parent 077f09f
@comboy authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/acts_as_archive.rb
View
4 lib/acts_as_archive.rb
@@ -208,7 +208,7 @@ def delete_sql_with_archive(sql, name = nil)
@mutex.synchronize do
unless ActsAsArchive.disabled
from, where = /DELETE FROM (.+)/i.match(sql)[1].split(/\s+WHERE\s+/i, 2)
- from = from.strip.gsub(/`/, '').split(/\s*,\s*/)
+ from = from.strip.gsub(/[`"]/, '').split(/\s*,\s*/)
ActsAsArchive.find(from).each do |config|
ActsAsArchive.move(config, where)
@@ -226,4 +226,4 @@ def delete_sql_with_archive(sql, name = nil)
::ActiveRecord::ConnectionAdapters::DatabaseStatements.send(:include, ::ActsAsArchive::DatabaseStatements)
require "acts_as_archive/adapters/rails#{Rails.version[0..0]}" if defined?(Rails)
-require "acts_as_archive/adapters/sinatra" if defined?(Sinatra)
+require "acts_as_archive/adapters/sinatra" if defined?(Sinatra)
Please sign in to comment.
Something went wrong with that request. Please try again.