Topic: routes.rb question
In short you use one controller for admin and public acces but use routes appended with admin to display admin layout.
For some odd reason I cannot get it to work properly. I getting an Unknown action error when trying to access http://www.domain.com/admin/products/view_products or http://www.domain.com/products/view_products but http://www.domain.com/admin/products and http://www.domain.com/products works as expected.
I suspect the problem lies in my routes.rb but i can't figure it out
map.resource :admin do |admin|
admin.resources :products, :name_prefix => 'admin_', :path_prefix => 'admin'
Can anyone suggest a solution or tell me where I might have gone wrong...