Routes problems

I have many links like these:

I need to use the name of the city in the beginning of urls if the
user has choosed it:

But previous links shoul work too (/articles/…, /albums/…)

I tried this:

map.articles ‘/articles/’, :controller => “zags”, :action =>
“cities”, :using_city => 1
map.articles ‘/:city_url/articles/’, :controller => “zags”, :action =>
“cities”, :using_city => 1

<%= link_to “London articles”, articles_path, { :city_url =>
“london”, :using_city => 1 } %>

But it does not work.
What should I change?
I know, that I can change one of map names “map.articles”, but I want
to use the same route names in my View code.How can I do it?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs