Permalink
Browse files

Merge pull request #1137 from guilleiguaran/each_syntax_in_activemodel

Prefer 'each' instead of 'for in'
  • Loading branch information...
2 parents 5281c29 + ec1993c commit 95bd19911a62fe7dbe8e72c08e29902efdcfce85 @josevalim josevalim committed May 19, 2011
Showing with 1 addition and 3 deletions.
  1. +1 −3 activemodel/lib/active_model/observing.rb
@@ -71,9 +71,7 @@ def add_observer(observer)
# 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.

0 comments on commit 95bd199

Please sign in to comment.