aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases/observer_array_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add additional tests for AM::ObserverArray that I had missed yesterday.Myron Marston2011-04-281-1/+50
|
* Fix bug with AM::Observer disablement.Myron Marston2011-04-281-0/+10
| | | | | Now that we propagate the enabling/disabling to descendants, we no longer have to check the disabled_observer Set on each superclass of the model class. This was causing a bug when disabling all observers at a superclass level and then enabling an individual observer at a subclass level. Plus the logic is simpler now :).
* Revert "Revert "Handle enabling/disabling observers at different levels of ↵Myron Marston2011-04-281-0/+39
| | | | | | | | | the class hierarchy."" This reverts commit 2a25c5818b03d7d6cd63aad180bff23479dbd861. I'm going to add another commit that keeps the same behavior of fixes the problems of leaking memory in development.
* Revert "Handle enabling/disabling observers at different levels of the class ↵José Valim2011-04-281-39/+0
| | | | | | | | | | hierarchy." This reverts commit ad62f1928768bd2676958a4a08512bad342fe469 because the current subclasses implementation leaks memory in development. Instead of keeping an array of subclasses, the better solution is to ask the parent if an observer is being disabled or not.
* Handle enabling/disabling observers at different levels of the class hierarchy.Myron Marston2011-04-281-0/+39
| | | | Last call wins.
* Allow observers to be enabled and disabled.Myron Marston2011-04-281-0/+122
This is useful in situations like model unit tests and the occasional rake task to backfill old data.