diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-04-27 16:58:36 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-04-27 16:58:36 +0000 |
commit | 8326a15784550f8a909e140f828dc0b1c83d617c (patch) | |
tree | 7c57a4c50944c6a2df6a5af63e2dd11a0fd2215b /actionpack/CHANGELOG | |
parent | f985bfd8f8854a3d27da39237ce410d12955595a (diff) | |
download | rails-8326a15784550f8a909e140f828dc0b1c83d617c.tar.gz rails-8326a15784550f8a909e140f828dc0b1c83d617c.tar.bz2 rails-8326a15784550f8a909e140f828dc0b1c83d617c.zip |
Added map.namespace to deal with the common situation of admin sections and the like [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6594 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/CHANGELOG')
-rw-r--r-- | actionpack/CHANGELOG | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 773458574a..9a676d5d8b 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,23 @@ *SVN* +* Added map.namespace to deal with the common situation of admin sections and the like [DHH] + + Before: + + map.resources :products, :path_prefix => "admin", :controller => "admin/products", :collection => { :inventory => :get }, :member => { :duplicate => :post } + map.resources :tags, :name_prefix => 'admin_product_', :path_prefix => "admin/products/:product_id", :controller => "admin/product_tags" + map.resources :images, :name_prefix => 'admin_product_', :path_prefix => "admin/products/:product_id", :controller => "admin/product_images" + map.resources :variants, :name_prefix => 'admin_product_', :path_prefix => "admin/products/:product_id", :controller => "admin/product_variants" + + After: + + map.namespace(:admin) do |admin| + admin.resources :products, + :collection => { :inventory => :get }, + :member => { :duplicate => :post }, + :has_many => [ :tags, :images, :variants ] + end + * Added :name_prefix as standard for nested resources [DHH]. WARNING: May be backwards incompatible with your app Before: |