Closed misterjt closed 11 years ago
It's sad! i need an url like this /sites/site.ru/edit for my admin panel, but when i'm trying to generate this
/sites/site.ru/edit
router.get('/sites/:id/edit').to('sites.edit'); router.url({controller:'sites',action:'edit',id:'site.ru'})
I'm gettin '/sites/false/edit' Please, tell me what to do?
The default regex for path variables is /[\w\-\s]+/
/[\w\-\s]+/
You can override this to include periods on a per-key basis like so:
router.get('/sites/:id/edit').to('sites.edit').where( { id: /[\w\-\s.]+/ } )
It's sad! i need an url like this
/sites/site.ru/edit
for my admin panel, but when i'm trying to generate thisI'm gettin '/sites/false/edit' Please, tell me what to do?