aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/observing.rb
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-08-041-47/+158
|\ | | | | | | | | | | Conflicts: activemodel/lib/active_model/secure_password.rb activerecord/lib/active_record/associations/collection_proxy.rb
| * update ActiveModel::Observer documentation [ci skip]Francesco Rodriguez2012-07-311-21/+32
| |
| * add :nodoc: to ActiveModel::Observing#inherited [ci skip]Francesco Rodriguez2012-07-301-1/+1
| |
| * update ActiveModel::Observing documentation [ci skip]Francesco Rodriguez2012-07-301-25/+125
| |
* | Remove ActiveRecord::Base.to_aJon Leighton2012-08-031-1/+1
| | | | | | | | | | On reflection, it seems like a bit of a weird method to have on ActiveRecord::Base, and it shouldn't be needed most of the time anyway.
* | load active_support/deprecation in active_support/railsXavier Noria2012-08-021-1/+0
| |
* | ActiveRecord::Base.all returns a Relation.Jon Leighton2012-07-271-1/+1
|/ | | | | | | | | | | Previously it returned an Array. If you want an array, call e.g. `Post.to_a` rather than `Post.all`. This is more explicit. In most cases this should not break existing code, since Relations use method_missing to delegate unknown methods to #to_a anyway.
* observer update refactoringAngelo Capilleri2012-07-031-2/+1
|
* notify_observers should be publicMarc-Andre Lafortune2012-04-301-19/+18
|
* Merge pull request #6063 from marcandre/observer_extra_argsAaron Patterson2012-04-301-9/+17
|\ | | | | Allow extra arguments for Observers
| * Allow extra arguments for ObserversMarc-Andre Lafortune2012-04-301-9/+17
| |
* | Merge pull request #6071 from marcandre/observer_redefJeremy Kemper2012-04-291-1/+1
|\ \ | | | | | | Fix Observer by acting on singleton class. Fixes #3505.
| * | Fix Observer by acting on singleton class [#3505]Marc-Andre Lafortune2012-04-291-1/+1
| |/ | | | | | | Also [issue #1034] [pull #6068]
* | Generate appropriate error more judiciouslyMarc-Andre Lafortune2012-04-291-2/+3
| |
* | Fix error message:Marc-Andre Lafortune2012-04-281-3/+3
|/ | | | | - can pass the class, not the instance - "instance method" is confusing, use "method :instance" instead
* Refactor Observer.observed_classOscar Del Ben2012-04-251-5/+2
|
* Merge pull request #5841 from oscardelben/rename_count_observersJosé Valim2012-04-241-1/+8
|\ | | | | Rename Observing#count_observers to Observing#observers_count
| * Rename Observing#count_observers to Observing#observers_countOscar Del Ben2012-04-141-1/+8
| |
* | Improve observers documentationOscar Del Ben2012-04-181-0/+2
| |
* | Rename notify_observers argument *arg to *args to make it more clearOscar Del Ben2012-04-141-2/+2
|/ | | | that the method accepts multiple arguments
* quote fix ` to ' in the ArgumentError messageManoj2012-01-241-1/+1
| | | | message quote fix
* Remove Array.wrap call in ActiveModelRafael Mendonça França2012-01-061-2/+1
|
* replaced remove and define method calls to :redefineAnand2011-11-071-2/+1
|
* Allow ActiveRecord observers to be disabled.Myron Marston2011-08-121-2/+2
| | | We have to use Observer#update rather than Observer#send since the enabled state is checked in #update before forwarding the method call on.
* ActionMailer deliver method Documentation corrected Ticket #761Ganesh Kumar2011-05-211-1/+1
|
* Prefer each instead of for inGuillermo Iguaran2011-05-191-3/+1
|
* Add documentation for new observer enable/disable feature.Myron Marston2011-05-061-2/+7
|
* Improved ActiveModel Observing docs.Sebastian Martinez2011-04-301-2/+4
|
* Fix bug with AM::Observer disablement.Myron Marston2011-04-281-3/+9
| | | | | 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 :).
* Fix dev env memory leaks by using AS::DescendantsTracker rather than keeping ↵Myron Marston2011-04-281-23/+7
| | | | | track of subclasses manually. There's also no need to keep track of all ObserverArray instances in a hash, as this is likely to leak memory, too.
* Revert "Revert "Handle enabling/disabling observers at different levels of ↵Myron Marston2011-04-281-0/+5
| | | | | | | | | 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-5/+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/+5
| | | | Last call wins.
* Allow observers to be enabled and disabled.Myron Marston2011-04-281-3/+24
| | | | This is useful in situations like model unit tests and the occasional rake task to backfill old data.
* Wrap line that is over 200 characters long. Now it's much easier to read.Myron Marston2011-04-281-1/+5
|
* minor correction to the Active Model instantiate_observers docJosh Kalderimis2011-04-221-1/+1
|
* remove unused assigned variablePaco Guzman2011-03-061-1/+1
|
* copy-edits 6d7a826Xavier Noria2011-02-211-3/+3
|
* Documentation: Added small comments to Observering moduleNicholas Rowe2011-02-201-0/+3
|
* add note about observer config for rails appsJimmy Cuadra2011-02-161-0/+4
| | | | | | | | ActiveModel::Observer and ActiveRecord::Observer have similar documentation, but a Rails user looking at the ActiveModel version might not realize that a change to config/application.rb is required to activate the observer. This change adds a note to that effect, pointing to the AR version from the AM version.
* Remove reference to ActiveRecord from ActiveModel commentsbrainopia2011-01-151-3/+7
|
* reader method eliminates defined? checksSubba Rao Pasupuleti2010-09-011-7/+9
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* lifecycle should be two words, life cycleJaime Iniesta2010-08-261-1/+1
|
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-7/+7
| | | | 's/[ \t]*$//' -i {} \;)
* Improve a bit the code in latest commits.José Valim2010-07-081-1/+2
|
* Removing method before redefining it. It was causing warnings. [#5072 ↵Łukasz Strzałkowski2010-07-081-0/+1
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Move constantize from conversions to inflections.Santiago Pastorino2010-06-261-1/+0
| | | | | | | | This removes ActiveModel dependency on TZInfo. [#4979 state:committed] Signed-off-by: José Valim <jose.valim@gmail.com>
* Revised and added headings.Rizwan Reza2010-06-141-0/+4
|
* Observing module is using constantizeSantiago Pastorino2010-06-061-0/+1
|
* Fix Active Model observer testsJeremy Kemper2010-04-161-0/+4
|