Install this gem in the project
gem 'metamagic'
In layouts/application.html.erb file
<%=metamagic site: "InitCoders", title: [:title, :site], keywords: [:keywords, "keyword 1", "keyword 2"], description: "", separator: " - " %>
Insert the following line at the very top of page of project (for eg. about_us.html.erb)
<%= render partial: 'layouts/partials/new_sub_header', locals: {page_title: 'About Us', page_sub_title: '']} %>
Now in layouts/partials/_new_sub_header.html.erb
<% meta title: "#{page_title}" %>
<h1><%=page_title%></h1>
<% unless page_sub_title.blank? %>
<p class="lead"><%=page_sub_title%></p>
<% end %>