diff options
author | Nicholas Seckar <nseckar@gmail.com> | 2006-02-26 17:49:09 +0000 |
---|---|---|
committer | Nicholas Seckar <nseckar@gmail.com> | 2006-02-26 17:49:09 +0000 |
commit | 26eaf073c4de8276663f927fdeeb91453e8b3956 (patch) | |
tree | 1690bbb49d971b063e240d155d58c503de938ee5 /activesupport/lib | |
parent | d11f8d551640c94e22c221c3bee39ab572b1dc72 (diff) | |
download | rails-26eaf073c4de8276663f927fdeeb91453e8b3956.tar.gz rails-26eaf073c4de8276663f927fdeeb91453e8b3956.tar.bz2 rails-26eaf073c4de8276663f927fdeeb91453e8b3956.zip |
Remove ::Controllers related cruft; fix AP tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/class/removal.rb | 10 | ||||
-rw-r--r-- | activesupport/lib/active_support/dependencies.rb | 4 |
2 files changed, 5 insertions, 9 deletions
diff --git a/activesupport/lib/active_support/core_ext/class/removal.rb b/activesupport/lib/active_support/core_ext/class/removal.rb index 628781669d..b217c1957c 100644 --- a/activesupport/lib/active_support/core_ext/class/removal.rb +++ b/activesupport/lib/active_support/core_ext/class/removal.rb @@ -8,17 +8,17 @@ class Class #:nodoc: end def remove_class(*klasses) - klasses.each do |klass| + klasses.flatten.each do |klass| # Skip this class if there is nothing bound to this name next unless defined?(klass.name) - + basename = klass.to_s.split("::").last parent = klass.parent - + # Skip this class if it does not match the current one bound to this name next unless parent.const_defined?(basename) && klass = parent.const_get(basename) - + parent.send :remove_const, basename unless parent == klass end end -end
\ No newline at end of file +end diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb index 6d5adb6605..b82c7e56f3 100644 --- a/activesupport/lib/active_support/dependencies.rb +++ b/activesupport/lib/active_support/dependencies.rb @@ -98,10 +98,6 @@ class Module #:nodoc: # Use const_missing to autoload associations so we don't have to # require_association when using single-table inheritance. def const_missing(class_id) - if Object.const_defined?(:Controllers) && Object::Controllers.const_available?(class_id) - return Object::Controllers.const_get(class_id) - end - file_name = class_id.to_s.demodulize.underscore file_path = as_load_path.empty? ? file_name : "#{as_load_path}/#{file_name}" begin |