I am working on my first Rails application and want to create an admin section.
Do I want to keep my views and controllers completely separate (that is, in separate directories) for the admin section and the rest of the site?
How can I organize my views/controllers in custom directories (how do I configure the routing)?
You could also keep the apps and controllers in their usual places and use Rails filters to control access, which is what I think you’re looking for here.
If you have the AWDWR Book handy, flip to Chap11 Task F Administrivia
before_filters.
This will intercept all calls to actions defined in AdminController and force them to go via authorize