mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Merge pull request #1137 from guilleiguaran/each_syntax_in_activemodel
Prefer 'each' instead of 'for in'
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user