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

Ticket #9573: actionpack.routing.possible_controllers.collect.diff

File actionpack.routing.possible_controllers.collect.diff, 0.6 kB (added by pkcahier, 1 year ago)
  • routing.rb

    old new  
    301301 
    302302          seen_paths = Hash.new {|h, k| h[k] = true; false} 
    303303          normalize_paths(paths).each do |load_path| 
    304             Dir["#{load_path}/**/*_controller.rb"].collect do |path| 
     304            Dir["#{load_path}/**/*_controller.rb"].sort.collect do |path| 
    305305              next if seen_paths[path.gsub(%r{^\.[/\\]}, "")] 
    306306               
    307307              controller_name = path[(load_path.length + 1)..-1]