Multiple named routes?

I finally got around to upgrading to 1.2 and of course shit broke. I’m
getting errors like this:

items_url failed to generate from {:action=>“list”, :format=>“rss”,
:controller=>“items”}, expected: {:action=>“list”,
:controller=>“items”}, diff: {:format=>“rss”}

Check out this piece of crap from my routes.rb:

map.items ‘items/category/:category_id’, :controller=>‘items’,
:action=>‘list’, :requirements => {:category_id => /\d+/}
map.items ‘items/order/:order’, :controller=>‘items’, :action=>‘list’
map.items ‘items/order/:order/page/:page’, :controller=>‘items’,
:action=>‘list’
map.items ‘items/page/:page’, :controller=>‘items’, :action=>‘list’
#map.items ‘items/type/:type’, :controller=>‘items’, :action=>‘list’#,
:requirements => {:category_id => /\d+/}
map.items ‘items/type/:type/order/:order’, :controller=>‘items’,
:action=>‘list’#, :requirements => {:category_id => /\d+/}
map.items ‘items/type/:type/order/:order/page/:page’,
:controller=>‘items’, :action=>‘list’#, :requirements => {:category_id
=> /\d+/}
map.items ‘items/type/:type/page/:page’, :controller=>‘items’,
:action=>‘list’#, :requirements => {:category_id => /\d+/}
map.items ‘items/username/:username’, :controller=>‘items’,
:action=>‘list’
map.items ‘items/username/:username/order/:order’,
:controller=>‘items’, :action=>‘list’
map.items ‘items/username/:username/order/:order/page/:page’,
:controller=>‘items’, :action=>‘list’
map.items ‘items/username/:username/page/:page’, :controller=>‘items’,
:action=>‘list’
map.items ‘items/format/:format’, :controller=>‘items’,
:action=>‘list’
map.items ‘items/type/:type’, :controller=>‘items’, :action=>‘list’

map.items ‘items’, :controller=>‘items’, :action=>‘list’,

:format=>nil

(If anybody can help simplify it, please feel free to help!) I’ve
screwed around with it for about 2.5 hours now and still can’t get it to
work. I’ve scoured the docs, the newsgroups, and the googles. Anybody
know how to make this work? It all worked fine with Rails 1.1.x.

Thanks!
Joe R. MUDCRAP-CE

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