aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-05-19 05:02:06 -0700
committerJosé Valim <jose.valim@gmail.com>2011-05-19 05:02:06 -0700
commit95bd19911a62fe7dbe8e72c08e29902efdcfce85 (patch)
tree2e1e04b0854be7a490b0a0c29faa420ca0195ac3
parent5281c296e66b7a343ab2684e8bc7d9b1fbe41283 (diff)
parentec1993c33f8b1493cc4f55102d9c4dee178306a2 (diff)
downloadrails-95bd19911a62fe7dbe8e72c08e29902efdcfce85.tar.gz
rails-95bd19911a62fe7dbe8e72c08e29902efdcfce85.tar.bz2
rails-95bd19911a62fe7dbe8e72c08e29902efdcfce85.zip
Merge pull request #1137 from guilleiguaran/each_syntax_in_activemodel
Prefer 'each' instead of 'for in'
-rw-r--r--activemodel/lib/active_model/observing.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/activemodel/lib/active_model/observing.rb b/activemodel/lib/active_model/observing.rb
index 4682ae07ef..b94ad4bb9b 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.