aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib/active_resource/observing.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activeresource/lib/active_resource/observing.rb')
-rw-r--r--activeresource/lib/active_resource/observing.rb29
1 files changed, 0 insertions, 29 deletions
diff --git a/activeresource/lib/active_resource/observing.rb b/activeresource/lib/active_resource/observing.rb
deleted file mode 100644
index 1bfceb8dc8..0000000000
--- a/activeresource/lib/active_resource/observing.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-module ActiveResource
- module Observing
- extend ActiveSupport::Concern
- include ActiveModel::Observing
-
- included do
- %w( create save update destroy ).each do |method|
- # def create_with_notifications(*args, &block)
- # notify_observers(:before_create)
- # if result = create_without_notifications(*args, &block)
- # notify_observers(:after_create)
- # end
- # result
- # end
- # alias_method_chain(create, :notifications)
- class_eval(<<-EOS, __FILE__, __LINE__ + 1)
- def #{method}_with_notifications(*args, &block)
- notify_observers(:before_#{method})
- if result = #{method}_without_notifications(*args, &block)
- notify_observers(:after_#{method})
- end
- result
- end
- EOS
- alias_method_chain(method, :notifications)
- end
- end
- end
-end