diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2016-12-29 01:20:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-29 01:20:38 -0500 |
commit | 003d6feb0d6086780b87bd80e8e8be78c10879cb (patch) | |
tree | bdd2c9fc0a3db074cde918c31b604213103fdc24 /test/support | |
parent | 1f5e99bb9c0da87deee796dd31f8e130a4cfd40b (diff) | |
parent | 3b1689f98c89f7e7a74c61e2894ed2bf81b2d56d (diff) | |
download | rails-003d6feb0d6086780b87bd80e8e8be78c10879cb.tar.gz rails-003d6feb0d6086780b87bd80e8e8be78c10879cb.tar.bz2 rails-003d6feb0d6086780b87bd80e8e8be78c10879cb.zip |
Merge pull request #462 from rails/arel-without-deprecation
Remove deprecated type cast support from Arel
Diffstat (limited to 'test/support')
-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 |