method
number_to_phone
number_to_phone(number, options = {})
public
Delegates to ActiveSupport::NumberHelper#number_to_phone.
Additionally, supports a :raise option that will cause InvalidNumberError to be raised if number is not a valid number:
number_to_phone("12x34") # => "12x34" number_to_phone("12x34", raise: true) # => InvalidNumberError