Je veux créer un parcours où toute valeur est acceptée, j'ai créé un comme çaRegex dans Rails de routage
get '/coworking-in-:coworking_place', to: 'home#coworking', constraints: { :coworking_place => /[a-z]*[A-Z]*/ }
Il fonctionne très bien avec les cas suivants:
- www. aboardoffices.com/coworking-in-delhi
- www.aboardoffices.com/coworking-in-mumbai
Mais il ne fonctionne pas dans les cas suivants:
- www.aboardoffices.com/coworking-in-sector7Dwarka
- www.aboardoffices.com/coworking-in-dlfPhase1Gurgaon
I Voulez-vous créer un itinéraire pouvant accepter tous les paramètres dans: coworking_place