aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-06-19 17:15:21 +0200
committerJosé Valim <jose.valim@gmail.com>2010-06-19 17:15:21 +0200
commit033e0a041f10ef4d4aa8ebb576560df20b971026 (patch)
treedca40d5fd673a6cc81105ee43cb2b85d2b20987f /actionpack
parenta2b7fcb07ca47ca2285dee2afe97050532e94d07 (diff)
downloadrails-033e0a041f10ef4d4aa8ebb576560df20b971026.tar.gz
rails-033e0a041f10ef4d4aa8ebb576560df20b971026.tar.bz2
rails-033e0a041f10ef4d4aa8ebb576560df20b971026.zip
ActiveRecord and ActionPack now use the new descendants implementation.
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/abstract_controller/base.rb13
1 files changed, 2 insertions, 11 deletions
diff --git a/actionpack/lib/abstract_controller/base.rb b/actionpack/lib/abstract_controller/base.rb
index e1027840ef..8a8337858b 100644
--- a/actionpack/lib/abstract_controller/base.rb
+++ b/actionpack/lib/abstract_controller/base.rb
@@ -1,4 +1,5 @@
require 'active_support/configurable'
+require 'active_support/descendants_tracker'
require 'active_support/core_ext/module/anonymous'
module AbstractController
@@ -10,6 +11,7 @@ module AbstractController
attr_internal :action_name
include ActiveSupport::Configurable
+ extend ActiveSupport::DescendantsTracker
class << self
attr_reader :abstract
@@ -21,17 +23,6 @@ module AbstractController
@abstract = true
end
- def inherited(klass)
- ::AbstractController::Base.descendants << klass.to_s
- super
- end
-
- # A list of all descendents of AbstractController::Base. This is
- # useful for initializers which need to add behavior to all controllers.
- def descendants
- @descendants ||= []
- end
-
# A list of all internal methods for a controller. This finds the first
# abstract superclass of a controller, and gets a list of all public
# instance methods on that abstract class. Public instance methods of