aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/observer.rb
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2012-10-05 11:52:20 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2012-10-05 11:52:20 -0300
commitabf8de85519141496a6773310964ec03f6106f3f (patch)
tree5149d0c61125567f0e704d2f520611a1718e168a /activerecord/lib/active_record/observer.rb
parent5c078368c762ec025997af6b2c94632b2f9301d2 (diff)
downloadrails-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.rb2
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)