Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 3524

Show
Ignore:
Timestamp:
02/02/06 16:56:15 (3 years ago)
Author:
ulysses
Message:

Add LoadingModule.clear! back temporarily

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activesupport/lib/active_support/dependencies.rb

    r3519 r3524  
    143143      self.const_defined?(name) || load_paths.any? {|lp| lp.filesystem_path(path + [name])} 
    144144    end 
     145     
     146    # Erase all items in this module 
     147    def clear! 
     148      constants.each do |name| 
     149        Object.send(:remove_const, name) if Object.const_defined?(name) && Object.const_get(name).object_id == self.const_get(name).object_id 
     150        self.send(:remove_const, name) 
     151      end 
     152    end 
    145153  end 
    146154   
  • trunk/railties/lib/dispatcher.rb

    r3520 r3524  
    5151    # to restart the server (WEBrick, FastCGI, etc.). 
    5252    def reset_application! 
     53      Controllers.clear! 
    5354      Dependencies.clear 
    5455      ActiveRecord::Base.reset_subclasses