aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-12-09 13:26:41 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2010-12-09 13:48:37 -0800
commitb2a042570cf55c716e44865cf6388f9079a86690 (patch)
treecd5d41935e81e25fbc20b7dc574ec135975d9042 /activerecord
parent1860d873f23446ec9c442a9a8625b74f0dd42594 (diff)
downloadrails-b2a042570cf55c716e44865cf6388f9079a86690.tar.gz
rails-b2a042570cf55c716e44865cf6388f9079a86690.tar.bz2
rails-b2a042570cf55c716e44865cf6388f9079a86690.zip
just use core methods
Diffstat (limited to 'activerecord')
-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 f0da4202bf..a09c392f9d 100644
--- a/activerecord/lib/active_record/observer.rb
+++ b/activerecord/lib/active_record/observer.rb
@@ -98,7 +98,7 @@ module ActiveRecord
protected
def observed_descendants
- observed_classes.sum([]) { |klass| klass.descendants }
+ observed_classes.map { |klass| klass.descendants }.flatten
end
def add_observer!(klass)