From 2dcd5c3b38808db3049a917644574eb0fcc59995 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Fri, 23 Dec 2022 12:03:55 -0300 Subject: [PATCH] Use #to_formatted_s instead #to_s Support Rails 7 #to_s Date Time DateTime deprecation. https://guides.rubyonrails.org/7_0_release_notes.html#active-support-deprecations --- lib/seed_dump/dump_methods.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/seed_dump/dump_methods.rb b/lib/seed_dump/dump_methods.rb index 6c97504..2fbe516 100644 --- a/lib/seed_dump/dump_methods.rb +++ b/lib/seed_dump/dump_methods.rb @@ -39,7 +39,7 @@ def value_to_s(value) when BigDecimal, IPAddr value.to_s when Date, Time, DateTime - value.to_s(:db) + value.to_formatted_s(:db) when Range range_to_string(value) when ->(v) { v.class.ancestors.map(&:to_s).include?('RGeo::Feature::Instance') }