I want to include meta tags in my homepage view. But I do not want to include it in the head section of the application.html.erb
file directly, as this will cause it to include the meta tags on all pages which is redundant for my app.
You can put
<% if content_for?(:head) %>
<%= yield(:head) %>
<% end %>
in head
section of application.html.erb
layout.
Then, in view in which you want to include these tags:
<% content_for :head do %>
<!-- your tags -->
<% end %>