
Untitled
By: a guest on
May 11th, 2012 | syntax:
None | size: 0.99 KB | hits: 14 | expires: Never
ActionController::Routing::Routes.draw do |map|
# Sample of named route:
# map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
# This route can be invoked with purchase_url(:id => product.id)
# You can have the root of your site routed by hooking up ''
# -- just remember to delete public/index.html.
map.connect '', :controller => 'site', :action => 'index', :id => nil
# Allow downloading Web Service WSDL as a file with an extension
# instead of a file named 'wsdl'
map.connect ':controller/service.wsdl', :action => 'wsdl'
# Named routes.
map.hub 'user', :controller => 'user', :action => 'index'
map.profile 'profile/:screen_name', :controller => 'profile', :action => 'show'
map.groupprofile 'profile/:group_name', :controller => 'profile', :action => 'showgroup'
# REST resources.
map.resources :group
# Install the default route as the lowest priority.
map.connect ':controller/:action/:id'
end