From 89cc4f15014cd7d544f912331bed836c5e5c3f0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Tue, 14 Aug 2012 04:05:37 -0300 Subject: Some release notes love :heart: --- guides/source/4_0_release_notes.textile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'guides') diff --git a/guides/source/4_0_release_notes.textile b/guides/source/4_0_release_notes.textile index 914ba0dd9a..0de8a0a4b7 100644 --- a/guides/source/4_0_release_notes.textile +++ b/guides/source/4_0_release_notes.textile @@ -196,6 +196,37 @@ h5(#actioncontroller_deprecations). Deprecations h4. Action Dispatch +* Add Routing Concerns to declare common routes that can be reused inside others resources and routes. + +Code before: + + +resources :messages do + resources :comments +end + +resources :posts do + resources :comments + resources :images, only: :index +end + + +Code after: + + +concern :commentable do + resources :comments +end + +concern :image_attachable do + resources :images, only: :index +end + +resources :messages, concerns: :commentable + +resources :posts, concerns: [:commentable, :image_attachable] + + * Show routes in exception page while debugging a RoutingError in development. * Include mounted_helpers (helpers for accessing mounted engines) in ActionDispatch::IntegrationTest by default. -- cgit v1.2.3