aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/observing.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/lib/active_model/observing.rb')
-rw-r--r--activemodel/lib/active_model/observing.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/activemodel/lib/active_model/observing.rb b/activemodel/lib/active_model/observing.rb
index 4682ae07ef..d48f2e8a1f 100644
--- a/activemodel/lib/active_model/observing.rb
+++ b/activemodel/lib/active_model/observing.rb
@@ -71,9 +71,7 @@ module ActiveModel
# Notify list of observers of a change.
def notify_observers(*arg)
- for observer in observer_instances
- observer.update(*arg)
- end
+ observer_instances.each { |observer| observer.update(*arg) }
end
# Total number of observers.
@@ -127,7 +125,7 @@ module ActiveModel
#
# class CommentObserver < ActiveModel::Observer
# def after_save(comment)
- # Notifications.deliver_comment("admin@do.com", "New comment was posted", comment)
+ # Notifications.comment("admin@do.com", "New comment was posted", comment).deliver
# end
# end
#