aboutsummaryrefslogtreecommitdiffstats
path: root/rails.gemspec
diff options
context:
space:
mode:
authorMislav Marohnić <mislav.marohnic@gmail.com>2010-04-16 19:37:12 +0200
committerJeremy Kemper <jeremy@bitsweat.net>2010-04-16 13:12:53 -0700
commit2161b8745a22379356b466a60b9aa763c0593f9b (patch)
treecb5a3df164f14d85d9916b97d4d4de0c3b609b31 /rails.gemspec
parentc2ca73c9ee5fc3dadf69cf565bd5e2bb30c82c50 (diff)
downloadrails-2161b8745a22379356b466a60b9aa763c0593f9b.tar.gz
rails-2161b8745a22379356b466a60b9aa763c0593f9b.tar.bz2
rails-2161b8745a22379356b466a60b9aa763c0593f9b.zip
improve how ActiveRecord::Observer defines callbacks on observed models
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>
Diffstat (limited to 'rails.gemspec')
0 files changed, 0 insertions, 0 deletions