Reputation: 343
I have a _header.html.erb rendering in all my pages from layouts/applications. Is there a way that i can not make it show on some pages? For example i would like the header not to show in example.com/videos/1.
Upvotes: 2
Views: 151
Reputation: 43298
You can do this in your layout file:
<% unless @hide_header %>
<%= render 'header' %>
<% end %>
And then set @hide_header = true
in your controller if you want it to be hidden.
Upvotes: 3