Re: model-controller-paradigm: What about admin controllers?

Jake Varghese
Wed, 13 Dec 2006 23:03:36 -0000

> jake wrote:
>> alot of ppl are torn by this very issue.  Personally, i find it easier
>> to give the extra namespace by adding afolder called admins/ in the app
>> directory and put all the admin functionality in there.  It just looks
>> nicer.
>>
>> Im sure there are plenty of reasons this is wrong (REST and stuff like
>> that), but i really dont care.  It just ''feels''
easier.
>
> What exactly do you mean with REST? And are the controllers all found in
> this subfolder, or do you have to add it to the path?


REST (or Representational State Transfer) is a paradigm of software
design.  Check it out at:
http://en.wikipedia.org/wiki/Representational_State_Transfer.

Only the editing part of the models is done in the admin controllers.
Outside of the admin controllers are the public facing.

For example:

app/
--admin/
----posts_controller.rb        <= for administration
----comments_controller.rb
--post_controller.rb           <= public facing
--comments controller