Commit Graph

17 Commits

Author SHA1 Message Date
Robert Pankowecki (Gavdi) bba3dacc3d Simplifies observer implementation [#6065 state:resolved] 2010-12-09 10:41:43 -08:00
Mislav Marohnić c2ca73c9ee ActiveModel::Observing: stop using Observable Ruby module, re-implement `notify_observers`
`Observable#notify_observers` from Ruby always returns false (which halts ActiveRecord
callback chains) and has extra features (like `changed`) that were never used.

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-04-16 13:09:07 -07:00
Mislav Marohnić cf616e4876 merge callbacks_observers_test.rb into lifecycle_test.rb where other observers test reside
Benefits: test able to run independently, subclassing instead of changing the original Comment model

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-04-16 13:09:07 -07:00
Evan Phoenix 79b0861624 Remove obsolete use case that was broken in AR::Observers 2010-03-22 10:00:04 -07:00
José Valim 2ea1d684d9 Refactor new callbacks and AR implementation.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-09-08 10:26:39 -05:00
José Valim 4f37b97033 Changed ActiveRecord to use new callbacks and speed up observers by only notifying events that are actually being consumed.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-09-08 10:26:39 -05:00
Tarmo Tänav 82343859d5 Added missing fixtures for tests which fail to run independently if run after schema reset
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-08-04 11:50:15 +02:00
Tarmo Tänav 656f0e7c6c Fix file permissions
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-07-31 16:36:23 -05:00
George Ogata e8fc894f66 Make observers define #after_find in the model only if needed.
[#676 state:resolved]
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-07-26 16:26:08 +02:00
Stefan Kaes fbef982e4b Observers not longer add an after_find method to the observed class.
[#625 state:resolved]
2008-07-15 16:48:16 -07:00
George Ogata bc4a2f156b Fix observers that use after_find. [#375 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-06-17 19:45:18 +01:00
Rick Olson 081ddb6f24 Merge the has_finder gem, renamed as 'named_scope'. Closes #11404 [nkallen]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9084 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-24 02:50:02 +00:00
Jeremy Kemper 23e58a0552 Fix observed_class. References #11099.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8889 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-17 22:52:55 +00:00
Michael Koziarski f3fd2b18b7 Add test for Observer#observer_class and change the implementation slightly. Closes #11099 [ernesto.jimenez]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8875 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-15 23:09:51 +00:00
Jeremy Kemper 39814fcce0 Merge branch 'ar-test-cleanup' of git://git.geeksomnia.com/rails
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-21 17:20:51 +00:00
Jeremy Kemper 1e70928014 Fix paths
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-18 07:31:37 +00:00
Jeremy Kemper 42b39ae3f2 Move tests to cases
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8660 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-18 07:30:42 +00:00