diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-08-14 04:05:37 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-08-14 04:05:37 -0300 |
commit | 89cc4f15014cd7d544f912331bed836c5e5c3f0a (patch) | |
tree | 52aac88e2125c4adf9e4440d240f046dde18e0be /guides | |
parent | 2d9dbf416b14610cc21fc10e68700c3a7ffc32a3 (diff) | |
download | rails-89cc4f15014cd7d544f912331bed836c5e5c3f0a.tar.gz rails-89cc4f15014cd7d544f912331bed836c5e5c3f0a.tar.bz2 rails-89cc4f15014cd7d544f912331bed836c5e5c3f0a.zip |
Some release notes love :heart:
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/4_0_release_notes.textile | 31 |
1 files changed, 31 insertions, 0 deletions
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: + +<ruby> +resources :messages do + resources :comments +end + +resources :posts do + resources :comments + resources :images, only: :index +end +</ruby> + +Code after: + +<ruby> +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] +</ruby> + * Show routes in exception page while debugging a <tt>RoutingError</tt> in development. * Include <tt>mounted_helpers</tt> (helpers for accessing mounted engines) in <tt>ActionDispatch::IntegrationTest</tt> by default. |