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

Changeset 5801

Show
Ignore:
Timestamp:
12/27/06 22:18:38 (2 years ago)
Author:
rick
Message:

Ensure plugins are in the Dependencies.load_once_paths collection by default. [Rick]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/railties/CHANGELOG

    r5792 r5801  
    11*SVN* 
     2 
     3* Ensure plugins are in the Dependencies.load_once_paths collection by default.  [Rick] 
     4  If you really want your plugins to reload, add this to the very top of init.rb: 
     5   
     6    Dependencies.load_once_paths.delete(lib_path) 
    27 
    38* Allow config.to_prepare to work, make the dispatcher safe to 're require'. [Koz, Nicholas Seckar] 
  • trunk/railties/lib/initializer.rb

    r5792 r5801  
    389389          $LOAD_PATH.insert(application_lib_index + 1, lib_path) 
    390390          Dependencies.load_paths << lib_path 
     391          Dependencies.load_once_paths << lib_path 
    391392        end 
    392393 
     
    613614      end 
    614615 
     616      # Doesn't matter since plugins aren't in load_paths yet. 
    615617      def default_load_once_paths 
    616         plugin_root = "#{root_path}/vendor/plugins/" 
    617         default_load_paths.select do |path| 
    618           path[0, plugin_root.length] == plugin_root # No begins_with yet 
    619         end 
     618        [] 
    620619      end 
    621620