diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2005-11-10 18:53:31 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2005-11-10 18:53:31 +0000 |
commit | 80b8b76091f680e4a4714ef8ec8458745a6f9388 (patch) | |
tree | e98fc86c96fa9849732e68b2df49e136355db6c2 | |
parent | 3309268120fade0cd643750a4bedf95097cbced6 (diff) | |
download | rails-80b8b76091f680e4a4714ef8ec8458745a6f9388.tar.gz rails-80b8b76091f680e4a4714ef8ec8458745a6f9388.tar.bz2 rails-80b8b76091f680e4a4714ef8ec8458745a6f9388.zip |
Update docs for AR::Base#clone.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2975 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 6 |
1 files changed, 5 insertions, 1 deletions
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) |