2161b8745a
Instead of using a single `notify_observers` call for every callback type, each observer now registers a unique callback for itself. Example: before_save :_notify_user_observer_for_before_save def _notify_user_observer_for_before_save observer.update(:before_save, self) end Benefit: "before" callbacks halt when `observer.update` returns false. This way, ActiveRecord observers can prevent records from saving. [#4087 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> |
||
---|---|---|
actionmailer | ||
actionpack | ||
activemodel | ||
activerecord | ||
activeresource | ||
activesupport | ||
bin | ||
ci | ||
doc/template | ||
railties | ||
tools | ||
.gitignore | ||
Gemfile | ||
load_paths.rb | ||
RAILS_VERSION | ||
rails.gemspec | ||
Rakefile | ||
release.rb | ||
version.rb |