This project is archived and is in readonly mode.

#4308 ✓committed
Sam Pohlenz

[PATCH] Restore changed_attributes method in ActiveModel::Dirty

Reported by Sam Pohlenz | April 1st, 2010 @ 12:01 PM | in 3.0.2

It seems that this commit removed the changed_attributes method from ActiveModel::Dirty, which lazily loaded the @changed_attributes ivar.

This then required another commit to ensure that the necessary ivars are initialized. However this still has the major drawback of requiring the including class to call super in its initialize method (depending on the inclusion order). This should not be necessary.

This patch restores the changed_attributes method. It is simpler, it uses a common pattern and removes these specific undocumented requirements on the including code.

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>

Attachments

Referenced by

Pages