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.administrateur = administrateur
|
||||||
service_cloned
|
service_cloned
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def telephone_url
|
||||||
|
if telephone.present?
|
||||||
|
"tel:#{telephone.gsub(/[[:blank:]]/, '')}"
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
= link_to service.email, "mailto:#{service.email}"
|
= link_to service.email, "mailto:#{service.email}"
|
||||||
%br
|
%br
|
||||||
Par téléphone :
|
Par téléphone :
|
||||||
= link_to service.telephone, "tel:#{service.telephone}"
|
= link_to service.telephone, service.telephone_url
|
||||||
%br
|
%br
|
||||||
Horaires : #{ formatted_horaires(service.horaires) }
|
Horaires : #{ formatted_horaires(service.horaires) }
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
= link_to service.email, "mailto:#{service.email}"
|
= link_to service.email, "mailto:#{service.email}"
|
||||||
%p.help-dropdown-service-item
|
%p.help-dropdown-service-item
|
||||||
%span.icon.small.phone
|
%span.icon.small.phone
|
||||||
= link_to service.telephone, "tel:#{service.telephone}"
|
= link_to service.telephone, service.telephone_url
|
||||||
%p.help-dropdown-service-item
|
%p.help-dropdown-service-item
|
||||||
%span.icon.small.clock
|
%span.icon.small.clock
|
||||||
= service.horaires
|
= service.horaires
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
%li
|
%li
|
||||||
Par téléphone :
|
Par téléphone :
|
||||||
%a{ href: "tel:#{service.telephone}" }= service.telephone
|
= link_to service.telephone, service.telephone_url
|
||||||
|
|
||||||
%li
|
%li
|
||||||
- horaires = "Horaires : #{formatted_horaires(service.horaires)}"
|
- horaires = "Horaires : #{formatted_horaires(service.horaires)}"
|
||||||
|
|
Loading…
Reference in a new issue