href should not contain space

This commit is contained in:
simon lehericey 2019-11-20 17:22:01 +01:00
parent 1bba20a782
commit f45ede7f44
4 changed files with 9 additions and 3 deletions

View file

@ -30,4 +30,10 @@ class Service < ApplicationRecord
service_cloned.administrateur = administrateur
service_cloned
end
def telephone_url
if telephone.present?
"tel:#{telephone.gsub(/[[:blank:]]/, '')}"
end
end
end