From 1f044350f6d3ab31786b7decd8c4970495c1b3be Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 14 Aug 2015 10:01:38 +1000 Subject: [PATCH] stop running exec_sql through active record this avoids double logging --- lib/freedom_patches/active_record_base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/freedom_patches/active_record_base.rb b/lib/freedom_patches/active_record_base.rb index eafb7f72193..4f62d40647a 100644 --- a/lib/freedom_patches/active_record_base.rb +++ b/lib/freedom_patches/active_record_base.rb @@ -4,7 +4,7 @@ class ActiveRecord::Base def self.exec_sql(*args) conn = ActiveRecord::Base.connection sql = ActiveRecord::Base.send(:sanitize_sql_array, args) - conn.execute(sql) + conn.raw_connection.exec(sql) end def self.exec_sql_row_count(*args)