Skip to content

Instantly share code, notes, and snippets.

@kwatch
Created July 21, 2012 01:52
Show Gist options
  • Select an option

  • Save kwatch/3154226 to your computer and use it in GitHub Desktop.

Select an option

Save kwatch/3154226 to your computer and use it in GitHub Desktop.
DSL for routing
route "/users/", :GET=>:index, :POST=>:create
route "/users/new", :GET=>:new
route "/users/:id", :GET=>:show, :PUT=>:update, :DELETE=>:destroy
route "/users/:id/edit", :GET=>:edit
## or
url_path "/users" do
route "/", :GET=>:index, :POST=>:create
route "/new", :GET=>:new
route "/:id", :GET=>:show, :PUT=>:update, :DELETE=>:destroy
route "/:id/edit", :GET=>:edit
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment