href should not contain space
This commit is contained in:
parent
1bba20a782
commit
f45ede7f44
4 changed files with 9 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
= link_to service.email, "mailto:#{service.email}"
|
||||
%br
|
||||
Par téléphone :
|
||||
= link_to service.telephone, "tel:#{service.telephone}"
|
||||
= link_to service.telephone, service.telephone_url
|
||||
%br
|
||||
Horaires : #{ formatted_horaires(service.horaires) }
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
= link_to service.email, "mailto:#{service.email}"
|
||||
%p.help-dropdown-service-item
|
||||
%span.icon.small.phone
|
||||
= link_to service.telephone, "tel:#{service.telephone}"
|
||||
= link_to service.telephone, service.telephone_url
|
||||
%p.help-dropdown-service-item
|
||||
%span.icon.small.clock
|
||||
= service.horaires
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
%li
|
||||
Par téléphone :
|
||||
%a{ href: "tel:#{service.telephone}" }= service.telephone
|
||||
= link_to service.telephone, service.telephone_url
|
||||
|
||||
%li
|
||||
- horaires = "Horaires : #{formatted_horaires(service.horaires)}"
|
||||
|
|
Loading…
Reference in a new issue