From 3d33881897977902f2bfc61ace46ae24211b3c14 Mon Sep 17 00:00:00 2001 From: ms32035 Date: Tue, 11 Mar 2014 23:05:10 +0100 Subject: [PATCH] date_add for mysql correction --- lib/rdbms_functions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rdbms_functions.rb b/lib/rdbms_functions.rb index a2b1c6e3..98e075d0 100644 --- a/lib/rdbms_functions.rb +++ b/lib/rdbms_functions.rb @@ -3,7 +3,7 @@ module RDBMSFunctions adapter_type = connection.adapter_name.downcase.to_sym case adapter_type when :mysql - "DATE_ADD(`#{source}`, INTERVAL #{unit} #{AMOUNT})" + "DATE_ADD(`#{source}`, INTERVAL #{amount} #{unit})" when :postgresql "(#{source} + INTERVAL '#{amount} #{unit}')" else