From 80b8b76091f680e4a4714ef8ec8458745a6f9388 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Thu, 10 Nov 2005 18:53:31 +0000 Subject: Update docs for AR::Base#clone. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2975 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/base.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 47b8b6b92b..7c89ba452a 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1247,7 +1247,11 @@ module ActiveRecord #:nodoc: freeze end - # Returns a clone of the record that hasn't been assigned an id yet and is treated as a new record. + # Returns a clone of the record that hasn't been assigned an id yet and + # is treated as a new record. Note that this is a "shallow" clone: + # it copies the object's attributes only, not its associations. + # The extent of a "deep" clone is application-specific and is therefore + # left to the application to implement according to its need. def clone attrs = self.attributes_before_type_cast attrs.delete(self.class.primary_key) -- cgit v1.2.3