samedi 28 mars 2015

output integer as phone number format in view

I am trying to show show this as a formatted phone number like: xxx-xxx-xxxx instead of just a number string like it currently is ..any help would be great!



<% if @post.phone.present? %>
<h4>Phone: <small> <%= @post.phone %><br></h4>
<% end %>

Aucun commentaire:

Enregistrer un commentaire