From 1e24cd4525c7ff58f9f2d1323292c2d67244ec01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Thu, 29 Dec 2016 01:14:01 -0500 Subject: Remove deprecated type cast support in Arel --- test/support/fake_record.rb | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'test/support') diff --git a/test/support/fake_record.rb b/test/support/fake_record.rb index 3d4c7d5630..4867dad5dc 100644 --- a/test/support/fake_record.rb +++ b/test/support/fake_record.rb @@ -59,16 +59,7 @@ module FakeRecord self end - def quote thing, column = nil - if column && !thing.nil? - case column.type - when :integer - thing = thing.to_i - when :string - thing = thing.to_s - end - end - + def quote thing case thing when DateTime "'#{thing.strftime("%Y-%m-%d %H:%M:%S")}'" @@ -116,8 +107,8 @@ module FakeRecord connection end - def quote thing, column = nil - connection.quote thing, column + def quote thing + connection.quote thing end end -- cgit v1.2.3