I want to route a URL like "http://localhost:3000/admin/product- details".I defined the route mapping in routes.rb:
map.namespace :admin do |admin| # Directs /admin/products/* to Admin::ProductsController (app/ controllers/admin/products_controller.rb) admin.product_details '/product-details(.:format)', :controller=>"product_details", :action=>"index", :conditions=>{:method=>:get} admin.connect '/product-details(.:format)', :controller=>"product_details", :action=>"create", :conditions=>{:method=>:post}
end
When I visit the URL,Rails throw a error: ActionController::RoutingError: No route matches "/admin/product- details" with {}
I visit http://localhost:3000/admin/product_details well.