Header in layout.erb


We've added a header in layout.erb but it is loaded only on the index.erb view.

How loading this header in all pages?

Thank you.

Gerbrand Stap
Normally the layout from

Normally the layout from layout.erb would be used for all .erb pages in your application. This can be customized with 'render :layout=>otherlayout', which will look for otherlayout.erb in the app folder. Also 'render :layout=>nil' can be used to render a page without a layout page. See here.

Did (accidentally) use the layout parameter in the pages other than index.erb?

Vote up!
Vote down!

Points: 0

You voted ‘up’

Log in to post comments