Skip to content

Instantly share code, notes, and snippets.

@DriesS
Created October 28, 2011 16:38
Show Gist options
  • Select an option

  • Save DriesS/1322715 to your computer and use it in GitHub Desktop.

Select an option

Save DriesS/1322715 to your computer and use it in GitHub Desktop.
Routes in rails 2
RAILS 2
=============
map.resources :profile
profile_index GET /profile(.:format) {:action=>"index", :controller=>"profile"}
new_profile GET /profile/new(.:format) {:action=>"new", :controller=>"profile"}
GET /profile/:id/edit(.:format) {:action=>"edit", :controller=>"profile"}
profile GET /profile/:id(.:format) {:action=>"show", :controller=>"profile"}
PUT /profile/:id(.:format) {:action=>"update", :controller=>"profile"}
DELETE /profile/:id(.:format) {:action=>"destroy", :controller=>"profile"}
POST /profile(.:format) {:action=>"create", :controller=>"profile"}
RAILS 3
=============
resources :profile
profile_index GET /profile(.:format) {:action=>"index", :controller=>"profile"}
POST /profile(.:format) {:action=>"create", :controller=>"profile"}
new_profile GET /profile/new(.:format) {:action=>"new", :controller=>"profile"}
GET /profile/:id/edit(.:format) {:action=>"edit", :controller=>"profile"}
profile GET /profile/:id(.:format) {:action=>"show", :controller=>"profile"}
PUT /profile/:id(.:format) {:action=>"update", :controller=>"profile"}
DELETE /profile/:id(.:format) {:action=>"destroy", :controller=>"profile"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment