This project is archived and is in readonly mode.

#231 ✓resolved
Ryan Bates

Calling reload on model should clear attribute changes

Reported by Ryan Bates | May 21st, 2008 @ 04:41 PM

Currently, calling reload on a model does not clear the attribute changes:

product.name = "foo"
product.changed? # => true
product.reload
product.changed? # => true

This patch fixes this problem by clearing the changed attributes after a reload. Tests are included.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Pages