diff options
author | Matt Ganderup <matt.ganderup@gmail.com> | 2009-06-01 10:24:15 -0700 |
---|---|---|
committer | Geoff Buesing <gbuesing@gmail.com> | 2009-08-03 22:41:56 -0500 |
commit | 55d1d12c32a1b99f3f07d2346b49a63650ba2e9d (patch) | |
tree | eb639136792af6af332cbc134f5ebbdaa5e6a435 /activerecord/lib | |
parent | 6f97ad07ded847f29159baf71050c63f04282170 (diff) | |
download | rails-55d1d12c32a1b99f3f07d2346b49a63650ba2e9d.tar.gz rails-55d1d12c32a1b99f3f07d2346b49a63650ba2e9d.tar.bz2 rails-55d1d12c32a1b99f3f07d2346b49a63650ba2e9d.zip |
fallback_string_to_date sets Date._parse comp arg to true, so that strings with two-digit years, e.g. '1/1/09', are interpreted as modern years [#2019 state:resolved]
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb index 24c734cddb..f4e8fe6a38 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb @@ -201,7 +201,7 @@ module ActiveRecord end def fallback_string_to_date(string) - new_date(*::Date._parse(string, false).values_at(:year, :mon, :mday)) + new_date(*::Date._parse(string, true).values_at(:year, :mon, :mday)) end def fallback_string_to_time(string) |