aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-09-02 11:44:36 -0500
committerJoshua Peek <josh@joshpeek.com>2009-09-02 11:44:36 -0500
commit723a47bfb3708f968821bc969a9a3fc873a3ed58 (patch)
treecfc3e3121affbd420dfe3832602248b57847c710 /activemodel/lib
parente870e24887e829547abdb6592d614c52f5412132 (diff)
downloadrails-723a47bfb3708f968821bc969a9a3fc873a3ed58.tar.gz
rails-723a47bfb3708f968821bc969a9a3fc873a3ed58.tar.bz2
rails-723a47bfb3708f968821bc969a9a3fc873a3ed58.zip
Kill AMo observing wrap_with_notifications since ARes was only using it
Diffstat (limited to 'activemodel/lib')
-rw-r--r--activemodel/lib/active_model/observing.rb17
1 files changed, 0 insertions, 17 deletions
diff --git a/activemodel/lib/active_model/observing.rb b/activemodel/lib/active_model/observing.rb
index 3b230c43b9..d9d1ab8967 100644
--- a/activemodel/lib/active_model/observing.rb
+++ b/activemodel/lib/active_model/observing.rb
@@ -40,23 +40,6 @@ module ActiveModel
observers.each { |o| instantiate_observer(o) }
end
- # Wraps methods with before and after notifications.
- #
- # wrap_with_notifications :create, :save, :update, :destroy
- def wrap_with_notifications(*methods)
- methods.each do |method|
- class_eval(<<-EOS, __FILE__, __LINE__ + 1)
- def #{method}_with_notifications(*args, &block)
- notify_observers(:before_#{method})
- result = #{method}_without_notifications(*args, &block)
- notify_observers(:after_#{method})
- result
- end
- EOS
- alias_method_chain(method, :notifications)
- end
- end
-
protected
def instantiate_observer(observer) #:nodoc:
# string/symbol