mirror of
https://github.com/CryptKeeperZK/ejs.git
synced 2026-01-10 07:58:26 -05:00
Merge pull request #584 from jbielick/master
Enabling nested resources.
This commit is contained in:
@@ -34,7 +34,7 @@ router.get('/').to('Main.index');
|
||||
// router.resource('hemispheres');
|
||||
//
|
||||
// Nested Resource-based routes
|
||||
// router.resource('hemispheres', function(){
|
||||
// router.resource('hemispheres').nest(function(){
|
||||
// this.resource('countries');
|
||||
// this.get('/print(.:format)').to('Hemispheres.print');
|
||||
// });
|
||||
|
||||
@@ -76,7 +76,7 @@ exports.create = function (data) {
|
||||
}
|
||||
else if (typeof val === 'object') {
|
||||
// Skip the item if it's just a format
|
||||
if (val.path === '.:format') {
|
||||
if (/:([a-z]+_?)*format$/i.test(val.path)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user