please, explain me how to write a rails routing:
I want to route all requiests, what income to a controller, to requested action, and all other - to certain controller/action
map.connect('products2/:action', :controller => "products2")
map.connect(':controller/:action/:id', :controller => "products2", :action => 'error')
when user requests SERVER/products2/test1 he gets a right result, but in other case (e.g., SERVER/prod/1) I get "Routing Error" message instead of redirecting to products/error.
Please, advise me how to resolve it ?