aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/observer.rb
Commit message (Collapse)AuthorAgeFilesLines
* Changed ActiveRecord to use new callbacks and speed up observers by only ↵José Valim2009-09-081-5/+15
| | | | | | notifying events that are actually being consumed. Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Integrate ActiveModel::Observing into ActiveRecordJoshua Peek2009-06-101-91/+4
|
* Break up DependencyModule's dual function of providing a "depend_on" DSL and ↵Joshua Peek2009-05-281-1/+1
| | | | "included" block DSL into separate modules. But, unify both approaches under AS::Concern.
* Use DependencyModule for included hooks in ActiveRecordBryan Helmkamp2009-05-111-3/+1
|
* Make observers define #after_find in the model only if needed.George Ogata2008-07-261-0/+3
| | | | | [#676 state:resolved] Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Observers not longer add an after_find method to the observed class.Stefan Kaes2008-07-151-5/+4
| | | | [#625 state:resolved]
* Fix observers that use after_find. [#375 state:resolved]George Ogata2008-06-171-1/+1
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Merge docrails.Pratik Naik2008-05-251-2/+2
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fix observed_class. References #11099.Jeremy Kemper2008-02-171-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8889 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add test for Observer#observer_class and change the implementation slightly. ↵Michael Koziarski2008-02-151-3/+3
| | | | | | Closes #11099 [ernesto.jimenez] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8875 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Reshuffle load order so that routes and observers are initialized after ↵Rick Olson2008-02-021-0/+14
| | | | | | plugins and app initializers. Closes #10980 [rick, fxn] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8787 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* observed_subclasses gives [] if there are no observed classesJeremy Kemper2008-01-091-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8602 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat: Class#subclasses is now protectedJeremy Kemper2007-12-221-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8478 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Observers can observe model names as symbols properly now. Closes #9869 ↵Rick Olson2007-10-141-1/+2
| | | | | | [queso] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7872 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added the possibility of using symbols in addition to concrete classes with ↵David Heinemeier Hansson2007-09-221-3/+5
| | | | | | ActiveRecord::Observer#observe #3998 [robbyrussell/tarmo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7539 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deprecation: removed Reloadable.Jeremy Kemper2007-09-141-4/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7473 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow sweepers to be created solely for expiring after controller actions, ↵David Heinemeier Hansson2007-06-261-3/+7
| | | | | | not model changes [DHH] Added assigns method to ActionController::Caching::Sweeper to easily access instance variables on the controller [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7128 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add an attribute reader method for ActiveRecord::Base.observers [Rick Olson]Rick Olson2006-09-301-0/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5211 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove ActiveRecord::Base.reset since Dispatcher doesn't use it anymore. ↵Rick Olson2006-08-091-9/+1
| | | | | | [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4743 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* New dependencies implementationNicholas Seckar2006-08-081-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4728 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactor ActiveRecord::Base.reset_subclasses to #reset, and add global ↵Rick Olson2006-08-061-2/+16
| | | | | | observer resetting. [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4683 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r4738@asus: jeremy | 2006-06-29 20:18:43 -0700Jeremy Kemper2006-06-301-30/+56
| | | | | | | Observers also watch subclasses created after they are declared. Closes #5535. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4521 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Replace Ruby's deprecated append_features in favor of included. [Marcel ↵Marcel Molina2006-04-291-2/+1
| | | | | | Molina Jr.] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4310 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* More docs for observers (closes #3996) [Robby Russel]David Heinemeier Hansson2006-03-021-1/+21
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3744 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Just go with Subclasses instead of OnlySubclassesDavid Heinemeier Hansson2006-02-041-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3534 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add Reloadable::OnlySubclasses which handles the common case where a base ↵Nicholas Seckar2006-02-021-5/+2
| | | | | | class should not be reloaded, but its subclasses should be. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3521 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added reusable reloading support through the inclusion of the Relodable ↵David Heinemeier Hansson2006-01-291-0/+7
| | | | | | module that all subclasses of ActiveRecord::Base, ActiveRecord::Observer, ActiveController::Base, and ActionMailer::Base automatically gets [DHH]. Added auto-loading support for classes in modules, so Conductor::Migration will look for conductor/migration.rb and Conductor::Database::Settings will look for conductor/database/settings.rb [Nicholas Seckar]. Refactored extensions to module, class, and object in active support [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3493 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Update documentation for observers to reflect new configuration system.Marcel Molina2005-10-271-3/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2766 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use assignment instead of callDavid Heinemeier Hansson2005-09-251-3/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2329 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use assignment instead of callDavid Heinemeier Hansson2005-09-251-6/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2327 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added new symbol-driven approach to activating observers with Base#observer ↵David Heinemeier Hansson2005-09-251-1/+32
| | | | | | [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2326 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that Observers didn't observe sub-classes #627 [Florian Weber]David Heinemeier Hansson2005-09-191-1/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2263 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Doc changesDavid Heinemeier Hansson2005-04-101-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1141 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Updated docs #1070David Heinemeier Hansson2005-04-101-11/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1128 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Finished polishing API docsDavid Heinemeier Hansson2005-02-231-3/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@773 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added that Observers can use the observes class method instead of ↵David Heinemeier Hansson2005-01-101-1/+5
| | | | | | overwriting self.observed_class() git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@367 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* InitialDavid Heinemeier Hansson2004-11-241-0/+71
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4 5ecf4fe2-1ee6-0310-87b1-e25e094e27de