Skip to content

Instantly share code, notes, and snippets.

@kieran
Created May 26, 2010 19:51
Show Gist options
  • Save kieran/414963 to your computer and use it in GitHub Desktop.
Save kieran/414963 to your computer and use it in GitHub Desktop.
r.match('/'+cslug+'(.:format)','GET').to({ controller: controller, action: 'index' }),
r.match('/'+cslug+'/add(.:format)','GET').to({ controller: controller, action: 'add' }),
r.match('/'+cslug+'/:id(.:format)','GET').to({ controller: controller, action: 'show' }),
r.match('/'+cslug+'/:id/edit(.:format)','GET').to({ controller: controller, action: 'edit' }),
r.match('/'+cslug,'POST').to({ controller: controller, action: 'create' }),
r.match('/'+cslug+'/:id(.:format)','PUT').to({ controller: controller, action: 'update' }),
r.match('/'+cslug+'/:id','DELETE').to({ controller: controller, action: 'remove' })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment