From 3b759f761b855a0f30821a09da539956ac60fc3f Mon Sep 17 00:00:00 2001 From: Joe Rafaniello Date: Tue, 29 Oct 2024 09:29:30 -0400 Subject: [PATCH] Rails 4? Remove long since deprecated bridge monkey patch It was originally added in be8403d4c0f7bf1b13c42654db01d5ced234dc09 --- config/initializers/as_to_time.rb | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 config/initializers/as_to_time.rb diff --git a/config/initializers/as_to_time.rb b/config/initializers/as_to_time.rb deleted file mode 100644 index f75513d4abf..00000000000 --- a/config/initializers/as_to_time.rb +++ /dev/null @@ -1,17 +0,0 @@ -require 'active_support/core_ext/string/conversions' -require 'active_support/deprecation' - -class String - alias_method :old_to_time, :to_time - - OBJ = Object.new - - def to_time(form = OBJ) - if form == OBJ - ActiveSupport::Deprecation.warn("Rails 4 changes the default of String#to_time to local. Please pass the type of conversion you want, like to_time(:utc) or to_time(:local)", caller.drop(1)) - old_to_time(:utc) - else - old_to_time(form) - end - end -end