From 63aea3ffa9897e748ff03dd119605453d518ac3f Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 26 Apr 2007 23:11:31 +0000 Subject: Added :has_many and :has_one for declaring plural and singular resources beneath the current [DHH] Added :name_prefix as standard for nested resources [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6588 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/CHANGELOG | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'actionpack/CHANGELOG') diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 9797f24410..773458574a 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,37 @@ *SVN* +* Added :name_prefix as standard for nested resources [DHH]. WARNING: May be backwards incompatible with your app + + Before: + + map.resources :emails do |emails| + emails.resources :comments, :name_prefix => "email_" + emails.resources :attachments, :name_prefix => "email_" + end + + After: + + map.resources :emails do |emails| + emails.resources :comments + emails.resources :attachments + end + + This does mean that if you intended to have comments_url go to /emails/5/comments, then you'll have to set :name_prefix to nil explicitly. + +* Added :has_many and :has_one for declaring plural and singular resources beneath the current [DHH] + + Before: + + map.resources :notes do |notes| + notes.resources :comments + notes.resources :attachments + notes.resource :author + end + + After: + + map.resources :notes, :has_many => [ :comments, :attachments ], :has_one => :author + * Added that render :xml will try to call to_xml if it can [DHH]. Makes these work: render :xml => post -- cgit v1.2.3