stop running exec_sql through active record

this avoids double logging
This commit is contained in:
Sam 2015-08-14 10:01:38 +10:00
parent b778b19318
commit 1f044350f6

View File

@ -4,7 +4,7 @@ class ActiveRecord::Base
def self.exec_sql(*args) def self.exec_sql(*args)
conn = ActiveRecord::Base.connection conn = ActiveRecord::Base.connection
sql = ActiveRecord::Base.send(:sanitize_sql_array, args) sql = ActiveRecord::Base.send(:sanitize_sql_array, args)
conn.execute(sql) conn.raw_connection.exec(sql)
end end
def self.exec_sql_row_count(*args) def self.exec_sql_row_count(*args)