I need to generate 2 types of URL and have defined my routes as: map.country_yes "/:country/ yes", :controller=>"posts", :action=>"country", :yes=>true map.country_no "/:country/ no", :controller=>"posts", :action=>"country", :yes=>false map.yes "/yes", :controller=>"posts", :action=>"index", :yes=>true map.no "/no", :controller=>"posts", :action=>"index", :yes=>false The problem is that, when a request if for /yes or /no, url_for() doesn''t generate URLs for the country. url_for(:yes=>true) generates the correct url no matter where its used. if the current request is for /no it generates /yes. if its for /mexico/no, it generates /mexico/yes though this is not the same when trying to generate URLs for country. If the request is at /no url_for(:country=>''usa'',:yes=>true) generates /no and tacks on ''usa'' and ''yes'' as query string parameters instead of generating /usa/yes. Why is this taking place? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---