Class: DateTime
- Inherits:
-
Object
- Object
- DateTime
- Defined in:
- lib/ndr_support/date_and_time_extensions.rb
Overview
Instance Method Summary collapse
- #orig_to_s ⇒ Object
-
#to_s(format = :default) ⇒ Object
Rails 7 stops overriding to_s (without a format specification) (for performance on Ruby 3.1) cf.
Instance Method Details
#orig_to_s ⇒ Object
64 |
# File 'lib/ndr_support/date_and_time_extensions.rb', line 64 alias orig_to_s to_s |
#to_s(format = :default) ⇒ Object
Rails 7 stops overriding to_s (without a format specification) (for performance on Ruby 3.1) cf. activesupport-7.0.4/lib/active_support/core_ext/date/deprecated_conversions.rb We keep overriding this for compatibility
69 70 71 72 73 74 75 |
# File 'lib/ndr_support/date_and_time_extensions.rb', line 69 def to_s(format = :default) if format == :default to_formatted_s(:default) else orig_to_s(format) end end |