Description
after upgrading the rails from 6.1 to 7, we are activating the options listed in the 'new_framework_defaults_7_0.rb' file one by one, as required in the official document.
according to the official document, enabling the option 'disable_to_s_conversion' should result in an error in a command such as 'Time.now.to _s(:db)'.
however, if the jsonapi-serializer gem is installed, a WARNING occurs instead of an error and the command is executed.
Expected Behavior
irb(main):001:0> Time.now.to_s(:db)
(irb):1:in `to_s': wrong number of arguments (given 1, expected 0) (ArgumentError)
Actual Behavior
irb(main):001:0> Time.now.to_s(:db)
DEPRECATION WARNING: Time#to_s(:db) is deprecated. Please use Time#to_fs(:db) instead. (called from <main> at (irb):1)
=> "2024-04-30 13:40:17"
Steps to Reproduce the Problem
- upgrade the rails from 6.1 to 7.
- enable the
config.active_support.disable_to_s_conversion option.
- run
rails console
- run
Time.now.to_s(:db)
Specifications
- Version: 2.2
- Ruby version: ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c5) [x86_64-linux]
Description
after upgrading the rails from 6.1 to 7, we are activating the options listed in the 'new_framework_defaults_7_0.rb' file one by one, as required in the official document.
according to the official document, enabling the option 'disable_to_s_conversion' should result in an error in a command such as 'Time.now.to _s(:db)'.
however, if the jsonapi-serializer gem is installed, a WARNING occurs instead of an error and the command is executed.
Expected Behavior
Actual Behavior
Steps to Reproduce the Problem
config.active_support.disable_to_s_conversionoption.rails consoleTime.now.to_s(:db)Specifications