Hello People,
(I am not good at ROR yet. This post could be very lame.)
I am going playing with routes.rb.
Well, pretty much any combination of mapping works, a part from:
map.connect ‘:action/:id/:controller/’
In this case, the request is routed; however, I get:
Showing app/views/inputs/start.rhtml where line #8 raised:
No url can be generated for the hash
{:controller=>“inputs”, :action=>“index”}
Extracted source (around line #8):
7:
8: <%=link_to “CLICK HERE!”, :controller => “inputs” %>
9:
10:
11:
RAILS_ROOT: script/…/config/…
Application Trace | Framework Trace | Full Trace
generated_code/routing/generation.rb:37:in generate_default_path' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/ action_controller/routing.rb:419:in
send’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/
action_controller/routing.rb:419:in generate_path' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/ action_controller/routing.rb:415:in
generate’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/
action_controller/url_rewriter.rb:44:in rewrite_path' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/ action_controller/url_rewriter.rb:11:in
rewrite’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/
action_controller/base.rb:448:in url_for' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_view/ helpers/url_helper.rb:18:in
send’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_view/
helpers/url_helper.rb:18:in url_for' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_view/ helpers/url_helper.rb:49:in
link_to’
#{RAILS_ROOT}/app/views/inputs/start.rhtml:8
-e:3:in `load’
-e:3
Request
Parameters: {“id”=>“10”}
Show session dump
Response
Headers: {“cookie”=>[], “Cache-Control”=>“no-cache”}
I can see how very, very few people would want such a route.
However… shall I report a bug about this?
Merc.