diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-12-29 01:14:01 -0500 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-12-29 01:14:51 -0500 |
commit | 1e24cd4525c7ff58f9f2d1323292c2d67244ec01 (patch) | |
tree | bd48510dd18101825cd7eab363a854bf4281f1ab /test/support/fake_record.rb | |
parent | 6ef13ec5d29b3ec66900c60bcfdf1ac5be8d20ac (diff) | |
download | rails-1e24cd4525c7ff58f9f2d1323292c2d67244ec01.tar.gz rails-1e24cd4525c7ff58f9f2d1323292c2d67244ec01.tar.bz2 rails-1e24cd4525c7ff58f9f2d1323292c2d67244ec01.zip |
Remove deprecated type cast support in Arel
Diffstat (limited to 'test/support/fake_record.rb')
-rw-r--r-- | test/support/fake_record.rb | 15 |
1 files changed, 3 insertions, 12 deletions
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 |