Skip to content

Instantly share code, notes, and snippets.

@rockymontana
Created September 1, 2015 09:10
Show Gist options
  • Save rockymontana/efcfbc4e5e33fd7ff976 to your computer and use it in GitHub Desktop.
Save rockymontana/efcfbc4e5e33fd7ff976 to your computer and use it in GitHub Desktop.
Router.map(function() {
DRoutes = Routes.find().fetch();
that = this;
DRoutes.forEach(function(dRoute) {
that.route('/' + dRoute.slug, {
name: dRoute.name,
controller: 'PageController',
where: 'client',
path: '/' + dRoute.slug,
layout: dRoute.layout
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment