Fernando Perez 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 :)

// Wouter
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to