From 84b654ea0fd4d73d55fe4608d40f28043f06b76c Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Tue, 13 Jul 2021 13:03:30 +0200 Subject: [PATCH] Follow up - ca56de3648815d18e39b593ed0f600f3cd6c2214 - Maintenance: Updated to Rails 6.0.4 and the new Zeitwerk autoloader: Removed workaround/backport of ActiveJob time serialization which is shipped with Rails 6. --- ...orkaround_active_job_time_serialization.rb | 47 ------------------- 1 file changed, 47 deletions(-) delete mode 100644 config/initializers/workaround_active_job_time_serialization.rb diff --git a/config/initializers/workaround_active_job_time_serialization.rb b/config/initializers/workaround_active_job_time_serialization.rb deleted file mode 100644 index 8ce5ae139..000000000 --- a/config/initializers/workaround_active_job_time_serialization.rb +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/ - -# Required workaround to serialize ActiveSupport::TimeWithZone, Time, Date and DateTime for ActiveJob -# until Rails 6 is used. See: -# - https://github.com/rails/rails/issues/18519 -# - https://github.com/rails/rails/pull/32026 -# - https://github.com/rails/rails/tree/6-0-stable/activejob/lib/active_job/serializers - -class ActiveSupport::TimeWithZone - include GlobalID::Identification - - alias id iso8601 - - def self.find(iso8601) - Time.iso8601(iso8601).in_time_zone - end -end - -class Time - include GlobalID::Identification - - alias id iso8601 - - def self.find(iso8601) - Time.iso8601(iso8601) - end -end - -class Date - include GlobalID::Identification - - alias id iso8601 - - def self.find(iso8601) - Date.iso8601(iso8601) - end -end - -class DateTime - include GlobalID::Identification - - alias id iso8601 - - def self.find(iso8601) - DateTime.iso8601(iso8601) - end -end