View Single Post
Old 04-27-2011, 08:40 AM   PM User | #1
randomizor
New to the CF scene

 
Join Date: Apr 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
randomizor is an unknown quantity at this point
Subdirectory controllers

Hello all,

I am trying to make a controller called Categories have subdirectories such as Fridges, Backpacks etc. Currently my setup works so that when browsing to 'categories/fridges/index', the index page from the fridge view page is shown. I want this page to appear when navigationg to 'categories/fridges'. Currently that page shows: "The action 'show' could not be found for CategoriesController".

I have set up my routing like so:

map.namespace :categories do |categories|
categories.resources :fridges
end

I have also tried matching '/fridges' to 'fridges#index' within the namespace but to no avail.

Is something wrong within my routing, or within the creation of the controllers?

Thanks in advance!
randomizor is offline   Reply With Quote