diff options
author | Sean Prashad <S.Prashad@outlook.com> | 2018-04-18 13:44:23 -0400 |
---|---|---|
committer | Alireza Bashiri <azbshiri@gmail.com> | 2018-07-17 08:41:54 +0430 |
commit | e8747cbb6e99220e60ad6e9c4b9d74165709bd78 (patch) | |
tree | 97a371b67d02326a8bf4a0746427138f81f63652 /activerecord | |
parent | 379d98dcd40f28fd959f42958d662b5416171eea (diff) | |
download | rails-e8747cbb6e99220e60ad6e9c4b9d74165709bd78.tar.gz rails-e8747cbb6e99220e60ad6e9c4b9d74165709bd78.tar.bz2 rails-e8747cbb6e99220e60ad6e9c4b9d74165709bd78.zip |
Implement change() to convert to "2001-01-01" first
(cherry picked from commit da34d4766c33a042aeb92778a492fa810ec23001)
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/quoting.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb index aec5fa6ba1..98b1348135 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb @@ -130,6 +130,7 @@ module ActiveRecord end def quoted_time(value) # :nodoc: + value = value.change(year: 2000, month: 1, day: 1) quoted_date(value).sub(/\A\d\d\d\d-\d\d-\d\d /, "") end |