What is the best way to create a custom title for pages in a Rails app without using a plug-in?
approach for page titling using content_for method and a partial
1 . partial name : _page_title.html.erb
<%content_for :page_title do %>
<%=title%>
<%end%>
2 . Usage in application.html.erb inside title tag
<%=yield :page_title %>
3 . Usage in respective *.html.erb excluding application.html.erb Just stick this in any .html.erb and supply title of the page
e.g : inside index.html.erb
<%=render '_page_title', title: 'title_of_page'%>