diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2017-07-18 13:42:57 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-18 13:42:57 -0400 |
commit | 36ff7b63ec083924a5b407cf3df7ae90e22183e2 (patch) | |
tree | 8cbdbe138f13a0dc7c3666f036fda685c644d262 /activerecord/lib/active_record/connection_adapters/mysql/quoting.rb | |
parent | 425ba83c28214ca97c5d3600c16ad7a796cd33e6 (diff) | |
parent | f47bac481949a69a519ea7d833e1a8d435332d52 (diff) | |
download | rails-36ff7b63ec083924a5b407cf3df7ae90e22183e2.tar.gz rails-36ff7b63ec083924a5b407cf3df7ae90e22183e2.tar.bz2 rails-36ff7b63ec083924a5b407cf3df7ae90e22183e2.zip |
Merge branch 'master' into fix_unscope_where_column_with_or
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/mysql/quoting.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/mysql/quoting.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql/quoting.rb b/activerecord/lib/active_record/connection_adapters/mysql/quoting.rb index d4f5906b33..0cc0ac74fe 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql/quoting.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql/quoting.rb @@ -39,6 +39,14 @@ module ActiveRecord def quoted_binary(value) "x'#{value.hex}'" end + + def _type_cast(value) + case value + when Type::Time::Value then value.__getobj__ + when Date, Time then value + else super + end + end end end end |