Skip to content

Instantly share code, notes, and snippets.

@j-mcnally
Created September 20, 2012 01:03
Show Gist options
  • Save j-mcnally/3753358 to your computer and use it in GitHub Desktop.
Save j-mcnally/3753358 to your computer and use it in GitHub Desktop.
@match path, _.extend(action: "index", state: "#{many}.index", name: many, method: ['GET'], options)
@match "#{path}/new", _.extend(action: "new", state: "#{many}.new", name: "new#{camelOne}", options)
@match path, _.extend(action: "create", state: "#{many}.create", method: "POST", options)
@match "#{path}/:id", _.extend(action: "show", state: "#{many}.show", name: one, options)
@match "#{path}/:id/edit", _.extend(action: "edit", state: "#{many}.edit", name: "edit#{camelOne}", options)
@match "#{path}/:id", _.extend(action: "update", state: "#{many}.update", method: "PUT", options)
@match "#{path}/:id", _.extend(action: "destroy", state: "#{many}.destroy", method: "DELETE", options)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment