Skip to content

Instantly share code, notes, and snippets.

@onethirtyfive
Created April 19, 2010 02:21
Show Gist options
  • Save onethirtyfive/370702 to your computer and use it in GitHub Desktop.
Save onethirtyfive/370702 to your computer and use it in GitHub Desktop.
a typical, if short Rails 3.0 'rake routes' output for a resource defined in routes with 'resources :posts'
[22:15][me@localhost:rails_project(master)]$ rake routes
(in /home/me/Code/rails_project)
GET /posts(.:format) {:controller=>"posts", :action=>"index"}
posts POST /posts(.:format) {:controller=>"posts", :action=>"create"}
new_post GET /posts/new(.:format) {:controller=>"posts", :action=>"new"}
GET /posts/:id(.:format) {:controller=>"posts", :action=>"show"}
PUT /posts/:id(.:format) {:controller=>"posts", :action=>"update"}
post DELETE /posts/:id(.:format) {:controller=>"posts", :action=>"destroy"}
edit_post GET /posts/:id/edit(.:format) {:controller=>"posts", :action=>"edit"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment