Skip to content

Commit 727d0af

Browse files
committed
routes.rb should teach how to use concerns
1 parent 80036f9 commit 727d0af

File tree

1 file changed

+7
-0
lines changed
  • railties/lib/rails/generators/rails/app/templates/config

1 file changed

+7
-0
lines changed

railties/lib/rails/generators/rails/app/templates/config/routes.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@
3939
# get 'recent', on: :collection
4040
# end
4141
# end
42+
43+
# Example resource route with concerns:
44+
# concern :toggleable do
45+
# post 'toggle'
46+
# end
47+
# resources :posts, concerns: :toggleable
48+
# resources :photos, concerns: :toggleable
4249

4350
# Example resource route within a namespace:
4451
# namespace :admin do

0 commit comments

Comments
 (0)