method

to_s

rails latest stable - Class: ActiveSupport::DeprecatedRangeWithFormat

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v7.0.0) is shown here.

to_s(format = NOT_SET)
public

No documentation available.

# File activesupport/lib/active_support/core_ext/range/deprecated_conversions.rb, line 6
    def to_s(format = NOT_SET)
      if formatter = RangeWithFormat::RANGE_FORMATS[format]
        ActiveSupport::Deprecation.warn(
          "Range#to_s(#{format.inspect}) is deprecated. Please use Range#to_formatted_s(#{format.inspect}) instead."
        )
        formatter.call(first, last)
      elsif format == NOT_SET
        super()
      else
        ActiveSupport::Deprecation.warn(
          "Range#to_s(#{format.inspect}) is deprecated. Please use Range#to_formatted_s(#{format.inspect}) instead."
        )
        super()
      end
    end