This project is archived and is in readonly mode.
[PATCH] Restore changed_attributes method in ActiveModel::Dirty
-
Jeremy Kemper
- State changed from new to wontfix
Calling super is normal, not a drawback. Using an ivar for localized implementation is simple; lazy loading for initialization is unnecessary when initialize is at our disposal.
-
Sam Pohlenz
Adding a one-line method (and removing initialize) is simpler than requiring that the including class always call super within its initialize method. Why push this responsibility to the implementer when it is trivial to take care of it in ActiveModel?
Furthermore, with these previous commits, ActiveModel::Dirty is now the only part of AM to require that super is called within initialize, not to mention that this requirement is now undocumented.
-
Jeremy Kemper
- State changed from wontfix to open
- Milestone cleared.
Good point and a fine reason to lazy-initialize. Sorry for glossing over that!
-
Repository
- State changed from open to committed
(from [3adaef8ae73a3061a9fe4c5e0256d80bc09b1cf4]) Restore changed_attributes method in ActiveModel::Dirty and loosen expectation on including class' initialize method.
[#4308 state:committed]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net
http://github.com/rails/rails/commit/3adaef8ae73a3061a9fe4c5e0256d8...
