The last changes in the CHANGELOG makes it clear that AR::Base.dup returns an object where new_record? is true. The attached patch clears the timestamps (if they exist) when calling dup. If we don't want that behavior though, we should document that dup preserves these AR-managed attributes.
In any case we should also close/mark as invalid that ticket AR::Clone does not clear out timestamps
Testing that dup is resetting the timestamps
Dup should reset the timestamps as it is considered a new record
I think the docs should also mention the details about callbacks.
@cesario perfect, thanks. I will apply this.
@fxn Not sure where we document this stuff. The behavior of dup is basically what clone used to do. If we documented clone somewhere, we need to change it to say "dup".
Here's another pull request documenting the dup behavior, and fixing the typo.