rails/activerecord/lib
Mislav Marohnić 2161b8745a 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>
2010-04-16 13:12:53 -07:00
..
active_record improve how ActiveRecord::Observer defines callbacks on observed models 2010-04-16 13:12:53 -07:00
rails/generators Generate module file for namespaced models [#4230 state:resolved] 2010-04-12 10:57:27 +02:00
active_record.rb i18n -> AS/i18n 2010-04-14 02:30:02 -07:00