From 34f8cd226ac50e2270e760c15813d11470f95d45 Mon Sep 17 00:00:00 2001 From: Pablo Torres Date: Sun, 2 Dec 2012 15:43:23 -0500 Subject: Show equivalent routes definition without using concerns [ci skip] --- guides/source/routing.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'guides') diff --git a/guides/source/routing.md b/guides/source/routing.md index 038f308a0f..4d63921429 100644 --- a/guides/source/routing.md +++ b/guides/source/routing.md @@ -392,6 +392,19 @@ resources :messages, concerns: :commentable resources :posts, concerns: [:commentable, :image_attachable] ``` +The above is equivalent to: + +```ruby +resources :messages do + resources :comments +end + +resources :posts do + resources :comments + resources :images, only: :index +end +``` + Also you can use them in any place that you want inside the routes, for example in a scope or namespace call: ```ruby -- cgit v1.2.3