Re: Auto admin ?

Wouter de Bie
Sun, 25 Oct 2009 17:33:24 -0000

> I''m sure we all find out that after some time, out admin pages
look the
> same, and have roughly the same code in their controllers.
>
> I already have been able to dramatically dry out my admin/controllers
> code by creating a generic admins_controller, and subclass it. But what
> about the views? They are similar, but I can''t find a way to use
same
> views for my admin controllers.
>
> How do you handle that? Plugin?

Hi,

If you don''t overload a method, you could specifically call render
:template => ''admin/action'', so that it will render a set
template. If
you overload a method in a subclass, you could do the same thing.
Hope this helps :)

// Wouter