One common template for different actions ? possible or not

Hi all,

Hey I want to know that, is it possible to have commont templates for
different methods(actions) in the controller?
Please reply!

Anil W.
Don’t live to geek; geek to live.

If you’re thinking of something like a layout for a controller, no,
that’s not available. However, the simple sidebar plugin (http:// might fit your

Benjamin C. – Collaborative test case management – Resources for the Rails community

yes, the standard scaffold shows one way. For example, the standard
index action is

def index
render :action => ‘list’

the render bit says to display with the template as for list. In general

render :action => thing

will use the templates for thing (using standard naming conventions
– ie, the template has the same name as the action + .rhtml)

More elaborate overriding of templates is possible, if you read the
relevant documentation.

John B.