Reputation: 467
How can I make the following number_to_phone
clickable in to order dial this phone number?
<%= number_to_phone(@business.phone_number, area_code: true) %>
Upvotes: 1
Views: 230
Reputation: 199
What about:
formatted_phone_number = number_to_phone(@business.phone_number, area_code: true)
link_to formatted_phone_number, "tel:#{formatted_phone_number}"
Upvotes: 3