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