Changeset 4749
- Timestamp:
- 08/10/06 16:46:43 (2 years ago)
- Files:
-
- branches/stable/actionpack/lib/action_controller/routing.rb (modified) (1 diff)
- branches/stable/railties/lib/initializer.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/stable/actionpack/lib/action_controller/routing.rb
r4748 r4749 263 263 end 264 264 265 attr_accessor :controller_paths 266 265 267 protected 266 def safe_load_paths #:nodoc:267 if defined?(RAILS_ROOT)268 $LOAD_PATH.select do |base|269 base = File.expand_path(base)270 extended_root = File.expand_path(RAILS_ROOT)271 # Exclude all paths that are not nested within app, lib, or components.272 base.match(/\A#{Regexp.escape(extended_root)}\/*(app|lib|components)\/[a-z]/) || base =~ %r{rails-[\d.]+/builtin}273 end274 else275 $LOAD_PATH276 end277 end278 268 279 269 def attempt_load(mod, const_name, path) 280 270 has_dir = false 281 safe_load_paths.each do |load_path|271 controller_paths.each do |load_path| 282 272 full_path = File.join(load_path, path) 283 273 file_path = full_path + '.rb' branches/stable/railties/lib/initializer.rb
r3982 r4749 237 237 def initialize_routing 238 238 return unless configuration.frameworks.include?(:action_controller) 239 ActionController::Routing::ControllerComponent.controller_paths = configuration.controller_paths 239 240 ActionController::Routing::Routes.reload 240 241 end