How do I make controller hierachies? Inherit or route them?

I would like a controller hierarchy with urls that look like…

/admin/documents

where /admin is handled by the admin_controller and documents by the
document_controller. I like the controller inheritance technique
discussed on the web[1], but I get a template not found error message.
I also have to define the route in the routes.rb file, which, according
to the author, is not supposed to be necessary.

I like the inheritance technique because it lets me put common methods
in one place. On the other hand, maybe it doesn’t have to be so
complicated. I can’t find much information on best practices. Any
advice would be much appreciated.

Jose

[1] http://justinfrench.com/index.php?id=122

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs