mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
routes.rb should teach how to use concerns
This commit is contained in:
parent
80036f9a53
commit
727d0af28c
1 changed files with 7 additions and 0 deletions
|
@ -39,6 +39,13 @@
|
|||
# get 'recent', on: :collection
|
||||
# end
|
||||
# end
|
||||
|
||||
# Example resource route with concerns:
|
||||
# concern :toggleable do
|
||||
# post 'toggle'
|
||||
# end
|
||||
# resources :posts, concerns: :toggleable
|
||||
# resources :photos, concerns: :toggleable
|
||||
|
||||
# Example resource route within a namespace:
|
||||
# namespace :admin do
|
||||
|
|
Loading…
Reference in a new issue