Monday, 17 September 2007

Rendering Global Partials

Just a quick note to point out. If you want to render a partial thats available globally (by default its local), all you have to do is create a folder in ..\app\views.

Assuming we created a folder called shared and a partial called _menu.rhtml, you can then access it by doing,
render :partial => "shared/menu"

Simple.

No comments: