You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes just DRY the controllers is not enough, if you need to DRY up your views, a lot of the resources often share the same views, wouldn't it be nice to have view files DRY'ed too? You can!
In Rails 3.1, this will be a Rails feature, but if you need to use a previous version, there are currently three projects do just that:
Inherited Resources Views
Inherited Resources Views is an extremely easy to use plugin to DRY the views associated with your inherited resources controllers. It is library-agnostic (it only depends on Inherited Resources) and it supports generating both erb and haml templates.
Inherited Views is a thin addition to the Inherited Resources project adding default html views which can be later customized on a per controller basis or globally for your rails app. It depends on Inherited Resources, Formtastic and WillPaginate.
Render Inheritable allows one to generally inherit or override single templates for controller hierarchies. If a template is not found in the current view folder, it is looked up in the parent controller's view folder. There are no other dependencies except for Rails 3.