views:

34

answers:

1

I have a rails application in which i have a namespace in the route as below

map.namespace :admin do |admin|    
  admin.resources :products                                         
end 

I have the controller under app/controller/admin

products_controller.rb has various actions like index, show, edit, new, create, update, destroy

when i try to use the new_admin_product_path, it is pointing to index action rather than new action.

how do i fix this?

+1  A: 

Go to your command prompt and run rake routes from your app root

This will list all the routes of your application. There you can find what route is for your new action.

Dinesh Atoliya
i cannot find the all the action in the list generated by the rake routes. thats why i posted here.
coder
surprised!!!!! could you post result of rake routes here ??
Dinesh Atoliya