Check that you have done the following (using admin/
products_controller.rb as an example):

# 1. Namespace your routes in routes.rb

map.namespace :admin do |admin|
  admin.resources :products
  admin.resources :orders
  # add other resources here
end

# 2. Namespace your controllers

class Admin::Products < ApplicationController
end

HTH,
Nicholas

On Jun 14, 5:37 pm, zambezi <[email protected]> wrote:
> Greetings folks,
>
> I'm looking for some confirmation before I go further astray.
>
> I decided to anticipate future growth and rather than use a flat
> controller directory (app/controllers ) without subfolders , I would
> try a 'tree' structure with subfolders (app/controllers/admin, app/
> controllers/info, etc.).
>
> Duh, but I ended up with broken routes.  The fix seems to be to add
> all the necessary permutations of subdirectory routes to the routes.rb
> file.  This of course leads to a fate potentially worse than the basic
> flat directory.
>
> Am I missing something easier and more generic to accommodate the
> routing for 'tree' directories.?
>
> Thanks. Bill
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to