Rails Layout Rendering with controller condition
- by Victor Martins
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?