mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #41801 from Shopify/optimize-numeric-to-s
Optimize ActiveSupport::NumericWithFormat#to_s
This commit is contained in:
commit
d612542336
1 changed files with 2 additions and 2 deletions
|
@ -107,9 +107,9 @@ module ActiveSupport
|
|||
# separator: ',',
|
||||
# significant: false) # => "1,2 Million"
|
||||
def to_s(format = nil, options = nil)
|
||||
return super() if format.nil?
|
||||
|
||||
case format
|
||||
when nil
|
||||
super()
|
||||
when Integer, String
|
||||
super(format)
|
||||
when :phone
|
||||
|
|
Loading…
Reference in a new issue