diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-23 14:13:03 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-23 14:29:05 -0800 |
commit | 0456feab1198456069d4b5a9da221e6fd818e3da (patch) | |
tree | 28cbb4a053c23a1a203805f4fbed91906a619a40 | |
parent | d717cb29136b8e4f557e6f6ddf076ae3de8476fc (diff) | |
download | rails-0456feab1198456069d4b5a9da221e6fd818e3da.tar.gz rails-0456feab1198456069d4b5a9da221e6fd818e3da.tar.bz2 rails-0456feab1198456069d4b5a9da221e6fd818e3da.zip |
updating changelog for dup and clone semantics
-rw-r--r-- | activerecord/CHANGELOG | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index a3e3051b96..f46db909ba 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,16 @@ *Rails 3.1.0 (unreleased)* +* ActiveRecord::Base#dup and ActiveRecord::Base#clone semantics have changed +to closer match normal Ruby dup and clone semantics. + +* Calling ActiveRecord::Base#clone will result in a shallow copy of the record, +including copying the frozen state. No callbacks will be called. + +* Calling ActiveRecord::Base#dup will duplicate the record, including calling +after initialize hooks. Frozen state will not be copied, and all associations +will be cleared. A duped record will return true for new_record?, have a nil +id field, and is saveable. + * Migrations can be defined as reversible, meaning that the migration system will figure out how to reverse your migration. To use reversible migrations, just define the "change" method. For example: |