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

Ticket #6458 (closed defect: wontfix)

Opened 3 years ago

Last modified 3 years ago

[PATCH]The routing for Components doesn't work wholly

Reported by: shouta Assigned to: ulysses
Priority: high Milestone: 1.x
Component: ActionPack Version: 1.1.6
Severity: blocker Keywords:
Cc:

Description

The routing for Components doesn't work wholly

The routing for Components doesn't work on 1.1.6 and 1.1.5 wholly. It was worked on 1.1.4.

patch

Index: C:/tool/RadRails0.7.1/workspace/action_controller/routing.rb
===================================================================
--- C:/tool/RadRails0.7.1/workspace/action_controller/routing.rb	(revision 5323)
+++ C:/tool/RadRails0.7.1/workspace/action_controller/routing.rb	(working copy)
@@ -269,7 +269,7 @@
               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}
+              base.match(/\A#{Regexp.escape(extended_root)}\/*(app|lib|components)/) || base =~ %r{rails-[\d.]+/builtin}
             end
           else
             $LOAD_PATH

test sample

code

#RAILS_ROOT/components/aaa/start_controller.rb

class Aaa::StartController < ApplicationController
  uses_component_template_root
	def index
	end
end

#RAILS_ROOT/components/aaa/start/index.rhtml

<html>
  <body>aaa</body>
</html>

And access to http://localhost:3000/aaa/start

browser log

Routing Error

Recognition failed for "/aaa/start"

webrick log

127.0.0.1 - - [19/Oct/2006:16:52:44] "GET /aaa/start HTTP/1.1" 404 598
- -> /aaa/start

Attachments

routing.rb.patch (0.8 kB) - added by shouta on 10/20/06 09:59:08.
patch for this bug

Change History

10/20/06 09:59:08 changed by shouta

  • attachment routing.rb.patch added.

patch for this bug

10/20/06 16:05:49 changed by david

  • owner changed from David to ulysses.

10/20/06 17:49:29 changed by ulysses

  • status changed from new to closed.
  • resolution set to wontfix.

You're quite right -- but since there is not going to be a 1.1.7, there is nothing to do. From what I can tell, trunk does not have this issue, and thus neither will 1.2. Please do reopen this ticket if I'm mistaken.

Thanks, Nicholas Seckar