Routing wierdness

perhaps i am missing something but i can’t seem to see it so perhaps
someone else can see what is going on

i have the following routes setup

map.connect “”, :controller => “main”, :action => “index”, :site =>
map.connect “admin”, :controller => “admin/main”, :action => “index”
map.connect “:site”, :controller => “main”, :action => “index”
map.connect “:controller/:action/:id”

however, the 2nd route never matches, but the 3rd one does.

in other words, if someone attempts to go to, i want them routed to admin/main controller,
index action

if someone goes to, route them to main controller, index

but for some reason IS NOTmatched against the 2nd route but IS
matched against the 3rd route.

am i missing something here?


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