Reputation: 383
In the body of application.html.erb
I have:
<%= render 'layouts/header'%>
<%= yield %>
<%= render 'layouts/footer'%>
On a certain view, I want to remove the footer partial, or otherwise have it not show up on the view. How should I do this?
Upvotes: 1
Views: 1178
Reputation: 773
You can set the condition below for rendering your partial.
<%= render 'layouts/header'%>
<%= yield %>
<% unless controller_name=="sessions" && action_name=='new' %>
<%= render 'layouts/footer'%>
<%end%>
Upvotes: 3