Go Back   CodingForums.com > :: Server side development > Ruby & Ruby On Rails

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
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
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:06 PM.


Advertisement
Log in to turn off these ads.