diff options
author | Pablo Torres <tn.pablo@gmail.com> | 2012-12-02 15:43:23 -0500 |
---|---|---|
committer | Pablo Torres <tn.pablo@gmail.com> | 2012-12-02 16:57:40 -0500 |
commit | 34f8cd226ac50e2270e760c15813d11470f95d45 (patch) | |
tree | 71bbf10ec58aa30f92043dea06d27341df9963fa /guides | |
parent | 12c7f8042d5945450d05164a3f333b9a5bea74e6 (diff) | |
download | rails-34f8cd226ac50e2270e760c15813d11470f95d45.tar.gz rails-34f8cd226ac50e2270e760c15813d11470f95d45.tar.bz2 rails-34f8cd226ac50e2270e760c15813d11470f95d45.zip |
Show equivalent routes definition without using concerns [ci skip]
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/routing.md | 13 |
1 files changed, 13 insertions, 0 deletions
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 |