Skip to content

Instantly share code, notes, and snippets.

@hashg
Created August 18, 2013 18:51
Show Gist options
  • Save hashg/6263280 to your computer and use it in GitHub Desktop.
Save hashg/6263280 to your computer and use it in GitHub Desktop.
function Routes() {
this.resource('register', {path: '/register'});
this.resource('login', {path: '/login'});
this.resource('logout', {path: '/logout'});
this.resource('projects', {path: 'projects'}, function(){
this.route('new', {path: '/new'});
});
this.resource('project', {path: 'projects/:project_id'}, function(){
this.route('edit', {path: '/edit'});
});
this.resource('persons', {path: 'persons'});
this.resource('person', {path: 'persons/:person_id'}, function(){
this.route('edit', {path: '/edit'});
});
this.resource('vacations', {path: '/persons/:person_id/vacations'}, function(){
this.route('new', {path: '/new'});
});
this.resource('vacation', {path: '/persons/:person_id/vacations/:vacation_id'}, function(){
this.route('edit', {path: '/edit'});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment