Skip to content

Change to_s(:medium) to to_fs(:medium)

Sincheol (David) Kim requested to merge fix-date-to-s-deprecations into master

What does this MR do and why?

Passing a format to to_s has been deprecated and replaced with to_fs in Rails 7.

This MR removes these deprecation warnings like this one DEPRECATION WARNING: TimeWithZone#to_s(:medium) is deprecated. Please use TimeWithZone#to_fs(:medium) instead..

https://github.com/rails/rails/blob/de7c495209811f8f918fa9f915e64df61a6080c1/guides/source/7_0_release_notes.md#deprecations-8

I think there are other formats in use, but I'm just changing the :medium format as that's the one I noticed while working on other issues and to keep this MR smaller.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Sincheol (David) Kim

Merge request reports