I am still struggling with url_for and routing. This is what I do: <%= url_for :controller => ''pages'', :action => ''index'', :id => 8 %> # This one is never used by url_for, although it works fine when requesting http://myhost/firstniftyurl map.connect ''firstniftyurl'', :controller => ''pages'', :action => ''index'', :id => 8 # This one is actually picked by url_for, creating http://myhost/myniftyurl (no :id in the URL) map.connect ''myniftyurl/:id'', :controller => ''pages'', :action => ''index'', :id => 8 # This creates the expected http://myhost/secondniftyurl/8 map.connect ''secondniftyurl/:id'', :controller => ''pages'', :action => ''index'' I have three questions: 1. Why is the first map.connect never used by url_for (why does the explicit :id parameter interfere)? 2. Why is the explicit :id parameter acceptable when there is an :id symbol in the route''s name/label? 3. Why is the :id symbol removed from the resulting URL because of the explicit :id parameter? Cheers, Jan -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---