<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -262,13 +262,23 @@ module ActionController
           nil
         end
         
-        attr_accessor :controller_paths
-        
       protected
+        def safe_load_paths #:nodoc:
+          if defined?(RAILS_ROOT)
+            $LOAD_PATH.select do |base|
+              base = File.expand_path(base)
+              extended_root = File.expand_path(RAILS_ROOT)
+              # Exclude all paths that are not nested within app, lib, or components.
+              base.match(/\A#{Regexp.escape(extended_root)}\/*(app|lib|components)\/[a-z]/) || base =~ %r{rails-[\d.]+/builtin}
+            end
+          else
+            $LOAD_PATH
+          end
+        end
         
         def attempt_load(mod, const_name, path)
           has_dir = false
-          controller_paths.each do |load_path|
+          safe_load_paths.each do |load_path|
             full_path = File.join(load_path, path)
             file_path = full_path + '.rb'
             if File.file?(file_path) # Found a .rb file? Load it up</diff>
      <filename>actionpack/lib/action_controller/routing.rb</filename>
    </modified>
    <modified>
      <diff>@@ -236,7 +236,6 @@ module Rails
     # loading module used to lazily load controllers (Configuration#controller_paths).
     def initialize_routing
       return unless configuration.frameworks.include?(:action_controller)
-      ActionController::Routing::ControllerComponent.controller_paths = configuration.controller_paths
       ActionController::Routing::Routes.reload
     end
     </diff>
      <filename>railties/lib/initializer.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>720f990472f206788227ee8d3fc7d9c91a4cfd6e</id>
    </parent>
  </parents>
  <author>
    <name>Nicholas Seckar</name>
    <email>nseckar@gmail.com</email>
  </author>
  <url>http://github.com/rubyruy/rails/commit/e071b60e17913e210baf9bf77c4c5c0bb344d999</url>
  <id>e071b60e17913e210baf9bf77c4c5c0bb344d999</id>
  <committed-date>2006-08-10T10:13:55-07:00</committed-date>
  <authored-date>2006-08-10T10:13:55-07:00</authored-date>
  <message>Can't use controller_path due to Admin model and Admin::UserController case

git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@4750 5ecf4fe2-1ee6-0310-87b1-e25e094e27de</message>
  <tree>89875d30d4002b90b07dfc0aeb4c1f570e256dd6</tree>
  <committer>
    <name>Nicholas Seckar</name>
    <email>nseckar@gmail.com</email>
  </committer>
</commit>
