diff options
author | Franck Verrot <franck@verrot.fr> | 2010-11-25 02:54:59 +0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-25 03:01:30 +0800 |
commit | 7f8ce38b0d294b5c5d38116f8de63f175f446bd4 (patch) | |
tree | 5fa1d4be6316274eae6a8937ed2de5d0bd9a4725 /activerecord | |
parent | 7b77a1fc71e54f6e42e97b426380303d696051c0 (diff) | |
download | rails-7f8ce38b0d294b5c5d38116f8de63f175f446bd4.tar.gz rails-7f8ce38b0d294b5c5d38116f8de63f175f446bd4.tar.bz2 rails-7f8ce38b0d294b5c5d38116f8de63f175f446bd4.zip |
Document the behavior of the dup method: does not preserve timestamps
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/base.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 1e0fd7c6fd..b7aac7a7c9 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1605,6 +1605,7 @@ MSG # only, not its associations. The extent of a "deep" copy is application # specific and is therefore left to the application to implement according # to its need. + # The dup method does not preserve the timestamps (created|updated)_(at|on). def initialize_dup(other) cloned_attributes = other.clone_attributes(:read_attribute_before_type_cast) cloned_attributes.delete(self.class.primary_key) |