mirror of https://github.com/rails/rails
to_formatted_s is an instance method for a Range not an Array
This commit is contained in:
parent
96aa3bd0ea
commit
02b0f8d9ff
|
@ -7,7 +7,7 @@ class Range
|
|||
#
|
||||
# ==== Example
|
||||
#
|
||||
# [1..100].to_formatted_s # => "1..100"
|
||||
# (1..100).to_formatted_s # => "1..100"
|
||||
def to_formatted_s(format = :default)
|
||||
if formatter = RANGE_FORMATS[format]
|
||||
formatter.call(first, last)
|
||||
|
|
Loading…
Reference in New Issue