If you want to group controllers you can do so like this
class Admin::UsersController < ApplicationController
class Admin::ImagesController < ApplicationController
Both those controllers are then prefixed by ‘admin’ (.com/admin/users
and .com/admin/images) and look for their views inside of /app/views/
However for what you’re wanting to do I would look into RESTful
routes. In app/config/routes.rb you can map resources (controllers)
map.resources :users, :path_prefix => “admin” (available at .com/admin/
the path prefix can be as long as you want, and if you want to get
really crazy you do things like this:
map.resources :users do |user|
then you could have a url like .com/users/9/images/4
peepcode.com have a screencast on RESTful Rails it’s well worth
spending the $9 on it.
hope that helps!
On Feb 19, 8:30 pm, “Dave A.” [email protected]