resources(:リソース名 [, オプション])
resources :pages
# pages GET /pages(.:format) pages#index
# POST /pages(.:format) pages#create
# new_page GET /pages/new(.:format) pages#new
# edit_page GET /pages/:id/edit(.:format) pages#edit
# page GET /pages/:id(.:format) pages#show
# PUT /pages/:id(.:format) pages#update
# DELETE /pages/:id(.:format) pages#destroy
resources :pages, as: :main
# main_index GET /pages(.:format) pages#index
# POST /pages(.:format) pages#create
# new_main GET /pages/new(.:format) pages#new
# edit_main GET /pages/:id/edit(.:format) pages#edit
# main GET /pages/:id(.:format) pages#show
# PUT /pages/:id(.:format) pages#update
# DELETE /pages/:id(.:format) pages#destroy
resources :pages, controller: :mains
# pages GET /pages(.:format) mains#index
# POST /pages(.:format) mains#create
# new_page GET /pages/new(.:format) mains#new
# edit_page GET /pages/:id/edit(.:format) mains#edit
# page GET /pages/:id(.:format) mains#show
# PUT /pages/:id(.:format) mains#update
# DELETE /pages/:id(.:format) mains#destroy
resources "pages", path: 'admin/page'
# pages GET /admin/page(.:format) pages#index
# POST /admin/page(.:format) pages#create
# new_page GET /admin/page/new(.:format) pages#new
# edit_page GET /admin/page/:id/edit(.:format) pages#edit
# page GET /admin/page/:id(.:format) pages#show
# PUT /admin/page/:id(.:format) pages#update
# DELETE /admin/page/:id(.:format) pages#destroy
resources :pages, only: [:index]
# pages GET /pages(.:format) pages#index
resources :pages, except: [:index, :show]
# pages POST /pages(.:format) pages#create
# new_page GET /pages/new(.:format) pages#new
# edit_page GET /pages/:id/edit(.:format) pages#edit
# page PUT /pages/:id(.:format) pages#update
# DELETE /pages/:id(.:format) pages#destroy
resources :pages, module: :main
# pages GET /pages(.:format) main/pages#index
# POST /pages(.:format) main/pages#create
# new_page GET /pages/new(.:format) main/pages#new
# edit_page GET /pages/:id/edit(.:format) main/pages#edit
# page GET /pages/:id(.:format) main/pages#show
# PUT /pages/:id(.:format) main/pages#update
# DELETE /pages/:id(.:format) main/pages#destroy
resources :users, constraints: {title: /[a-z]{1,15}/}
# users GET /users(.:format) users#index {:title=>/[a-z]{1,15}/}
# POST /users(.:format) users#create {:title=>/[a-z]{1,15}/}
# new_user GET /users/new(.:format) users#new {:title=>/[a-z]{1,15}/}
# edit_user GET /users/:id/edit(.:format) users#edit {:title=>/[a-z]{1,15}/}
# user GET /users/:id(.:format) users#show {:title=>/[a-z]{1,15}/}
# PUT /users/:id(.:format) users#update {:title=>/[a-z]{1,15}/}
# DELETE /users/:id(.:format) users#destroy {:title=>/[a-z]{1,15}/}
resources :photos do
resources :comments
end