2005/10/24, Stefan Foulis:
> I'm new to ruby and rails. I used to code with php and java
> (WebObjects). Finally I found a language with a framework that nicely
> abstracts the datamodel with full funtionality on a _sensible_ level and
> a high level of consistency. Enough of that, we all know ruby is great ;-)
>
> I followed "Agile Web Development with Rails". In the depot application
> there is one controller "admin" for the backend and another "store" for
> the public users.
> I just started coding my own application with a much more complex model
> than depot. If I create just one controller for all the backend
> administration, that one controller may turn out cluttered with far to
> many methods (like list_customers, list_contacts, list_projects,...
> instead of just one list). How should organize the code?
> Multiple controllers: store_admin, project_admin, billing_admin, ... ?
> Or is there some other way I'm not aware of?
>
> thanks
> stefan

Hi,
To resolve this problem, you can create a directory into controller
dir called "admin". Inside it, you put your controller files in it,
specifying for each files the following header:
class Admin::EntryController < ApplicationController (for example)

For the views, you need to create an admin dir into the views dir.
This directory has the same arbo than a normal one.