Rails Layout Rendering with controller condition

Posted by Victor Martins on Stack Overflow See other posts from Stack Overflow or by Victor Martins
Published on 2010-04-07T12:15:30Z Indexed on 2010/04/07 12:23 UTC
Read the original article Hit count: 323

Filed under:
|
|

I don't know what's the best way to doing this.

On my application.html.erb I define a header div.

My default controller ( root ) is a homepage controller. And I wish that if I'm at index of the homepage the header is rendering with some content, but all other controllers render another content inside that header.

How can I make a condition in that header div to render different content based on the controller that's being rendered?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about render