Auto admin?

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?

Fernando P. wrote:

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 :slight_smile:

// Wouter

Fernando P. wrote:

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?

ActiveScaffold?

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

ActiveScaffold sounds interesting. Any feedback? I see it’s well
maintained, it’s a good selling point for me.

There’s an interesting Railscast on the subject:

It’s a different approach, but might work for what you’re doing.

On Sun, Oct 25, 2009 at 10:35 AM, Marnen Laibow-Koser <

Fernando P. wrote:

ActiveScaffold sounds interesting. Any feedback? I see it’s well
maintained, it’s a good selling point for me.

I mostly like it. It’s not perfect, but it’s quick and easy.

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]