提交 0456feab 编写于 作者: A Aaron Patterson

updating changelog for dup and clone semantics

上级 d717cb29
*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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册