diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-06-14 08:06:51 -0600 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2015-01-15 08:04:43 -0700 |
commit | 5cd3bbbb832b58d2a0092f527d83312df4271de7 (patch) | |
tree | bdecb3dcb2569777aefcf73438bdd35617cd3462 /activerecord/test/cases/helper.rb | |
parent | d8e710410ea300ec4626250c0b35946cb52bc38c (diff) | |
download | rails-5cd3bbbb832b58d2a0092f527d83312df4271de7.tar.gz rails-5cd3bbbb832b58d2a0092f527d83312df4271de7.tar.bz2 rails-5cd3bbbb832b58d2a0092f527d83312df4271de7.zip |
Time columns should support time zone aware attributes
The types that are affected by `time_zone_aware_attributes` (which is on
by default) have been made configurable, in case this is a breaking
change for existing applications.
Diffstat (limited to 'activerecord/test/cases/helper.rb')
-rw-r--r-- | activerecord/test/cases/helper.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/test/cases/helper.rb b/activerecord/test/cases/helper.rb index 925491acbd..0a577fa2f5 100644 --- a/activerecord/test/cases/helper.rb +++ b/activerecord/test/cases/helper.rb @@ -30,6 +30,9 @@ ARTest.connect # Quote "type" if it's a reserved word for the current connection. QUOTED_TYPE = ActiveRecord::Base.connection.quote_column_name('type') +# FIXME: Remove this when the deprecation cycle on TZ aware types by default ends. +ActiveRecord::Base.time_zone_aware_types << :time + def current_adapter?(*types) types.any? do |type| ActiveRecord::ConnectionAdapters.const_defined?(type) && |