Changeset 4748
- Timestamp:
- 08/10/06 16:08:28 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/stable/actionpack/lib/action_controller/routing.rb
r4747 r4748 220 220 end 221 221 222 def file_kinds(kind)223 ((@file_kinds ||= [:components]) << kind).uniq! || @file_kinds224 end225 226 222 def traverse_to_controller(segments, start_at = 0) 227 223 mod = ::Object … … 233 229 index += 1 234 230 235 file_kinds :app236 231 mod_name = segment.camelize 237 232 controller_name = "#{mod_name}Controller" … … 274 269 base = File.expand_path(base) 275 270 extended_root = File.expand_path(RAILS_ROOT) 276 base.match(/\A#{Regexp.escape(extended_root)}\/*(#{file_kinds(:lib) * '|'})\/[a-z]/) || base =~ %r{rails-[\d.]+/builtin} 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} 277 273 end 278 274 else