Resource Routes

Simple
map.resources :users, :sessions



Nested
map.resources :teams do |teams|
  teams.resources :players
end



Customized
map.resources :articles,
                    :collection => {:sort => :put},
                    :member => {:deactivate => :delete},
                    :new => {:preview => :post},
                    :controller => 'articles',
                    :singular => 'article',
                    :path_prefix => '/book/:book_id',
                    :name_prefix => 'book_'

你可能感兴趣的:(rails routes)