Is there a way to append or override the page element inside a rails view?
Suppose I have something I only want to include in a particular
In your application.html.erb:
application.html.erb
<head> <% if content_for? :for_head %> <%= yield :for_head %> <% end %> </head>
In your "specific" view:
<% content_for :for_head do %> Something-to-put-in-head <% end %>
:for_head isn't predefined: naming it is up to you. It could be anything.
:for_head