Permalink
Browse files

Ruby 1.9 compat: Class#subclasses is now protected

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8478 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent ca81278 commit 750f15bc264eacd0d008182052e8df7b04971b5c @jeremy jeremy committed Dec 22, 2007
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/observer.rb
@@ -170,7 +170,7 @@ def observed_classes
end
def observed_subclasses
- observed_classes.collect(&:subclasses).flatten
+ observed_classes.sum { |klass| klass.send(:subclasses) }
end
def add_observer!(klass)

0 comments on commit 750f15b

Please sign in to comment.