diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2012-10-05 11:52:20 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2012-10-05 11:52:20 -0300 |
commit | abf8de85519141496a6773310964ec03f6106f3f (patch) | |
tree | 5149d0c61125567f0e704d2f520611a1718e168a /activerecord/lib/active_record/observer.rb | |
parent | 5c078368c762ec025997af6b2c94632b2f9301d2 (diff) | |
download | rails-abf8de85519141496a6773310964ec03f6106f3f.tar.gz rails-abf8de85519141496a6773310964ec03f6106f3f.tar.bz2 rails-abf8de85519141496a6773310964ec03f6106f3f.zip |
Use flat_map { } instead of map {}.flatten
Diffstat (limited to 'activerecord/lib/active_record/observer.rb')
-rw-r--r-- | activerecord/lib/active_record/observer.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/observer.rb b/activerecord/lib/active_record/observer.rb index 6b2f6f98a5..6fe98a8f6d 100644 --- a/activerecord/lib/active_record/observer.rb +++ b/activerecord/lib/active_record/observer.rb @@ -99,7 +99,7 @@ module ActiveRecord def observed_classes klasses = super - klasses + klasses.map { |klass| klass.descendants }.flatten + klasses + klasses.flat_map { |klass| klass.descendants } end def add_observer!(klass) |