1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/fixtures/pirates.yml
Rafael Mendonça França c2e12e0191
Use to_formatted_s(:db) instead of to_s(:db) internally
Ruby 3.1 introduced an optimization to string interpolation for some
core classes in b08dacfea3.

But since we override `to_s` in some of those core classes to add behavior
like `to_s(:db)`, all Rails applications will not be able to take advantage
of that improvement.

Since we can use the `to_formatted_s` alias for the Rails specific behavior
it is best for us to deprecate the `to_s` core extension and allow Rails
applications to get the proformace improvement.

This commit starts removing all the `to_s(:db)` calls inside the framework
so we can deprecate the core extension in the next commit.
2021-12-06 19:22:04 +00:00

15 lines
293 B
YAML

blackbeard:
catchphrase: "Yar."
parrot: george
redbeard:
catchphrase: "Avast!"
parrot: louis
created_on: "<%= 2.weeks.ago.to_formatted_s(:db) %>"
updated_on: "<%= 2.weeks.ago.to_formatted_s(:db) %>"
mark:
catchphrase: "X $LABELs the spot!"
1:
catchphrase: "#$LABEL pirate!"